This commit is contained in:
Benjamin Toby
2025-07-05 18:17:35 +01:00
parent fcc668d3a1
commit 3597b11342
8 changed files with 32 additions and 19 deletions
@@ -23,6 +23,7 @@ type Param<T extends { [k: string]: any } = any> = {
identifierColumnName: keyof T;
identifierValue: string | number;
forceLocal?: boolean;
debug?: boolean;
};
/**
@@ -42,6 +43,7 @@ export default async function updateDbEntry<
encryptionKey,
encryptionSalt,
forceLocal,
debug,
}: Param<T>): Promise<APIResponseObject<PostInsertReturn>> {
/**
* Check if data is valid
@@ -192,5 +194,6 @@ export default async function updateDbEntry<
sql: query,
params: updateValues,
},
debug: debug ? { data, newData } : undefined,
};
}