Grok 5 updates

This commit is contained in:
2026-07-14 08:33:44 +01:00
parent 3b5fba4063
commit 79c5b896fe
21 changed files with 1211 additions and 61 deletions
+8 -1
View File
@@ -7,6 +7,7 @@ import type {
ServerQueryParam,
} from "../../types";
import sqlGenerator from "../../utils/sql-generator";
import sanitizeHtmlFields from "../../utils/sanitize-html-fields";
type Params<
Schema extends { [k: string]: any } = { [k: string]: any },
@@ -69,9 +70,15 @@ export default async function DbUpdate<
let sql = ``;
sql += `UPDATE ${quoteIdentifier(table)} SET`;
const sanitizedData = sanitizeHtmlFields({
table,
data,
config,
});
const finalData: { [k: string]: SQLInsertGenValueType } = {
updated_at: Date.now(),
...data,
...sanitizedData,
};
const keys = Object.keys(finalData);