Typed updateRecord hook in generic field logic (#3102)

* Typed updateRecord hook in generic field logic

* Use sanitize instead of additional optimisticInput
This commit is contained in:
Lucas Bordeau
2023-12-21 16:27:26 +01:00
committed by GitHub
parent 0d00e3d62d
commit 180aec5ad8
26 changed files with 124 additions and 150 deletions

View File

@ -93,7 +93,7 @@ export const CreateProfile = () => {
await updateOneRecord({
idToUpdate: currentWorkspaceMember?.id,
input: {
updateOneRecordInput: {
name: {
firstName: data.firstName,
lastName: data.lastName,

View File

@ -36,7 +36,7 @@ export const Opportunities = () => {
}) => {
updateOnePipelineStep?.({
idToUpdate: columnId,
input: { name: title, color },
updateOneRecordInput: { name: title, color },
});
};

View File

@ -65,7 +65,7 @@ export const SettingsDevelopersApiKeyDetail = () => {
const deleteIntegration = async (redirect = true) => {
await updateApiKey?.({
idToUpdate: apiKeyId,
input: { revokedAt: DateTime.now().toString() },
updateOneRecordInput: { revokedAt: DateTime.now().toString() },
});
performOptimisticEvict('ApiKey', 'id', apiKeyId);
if (redirect) {