fix(ci): format catalog repair audit write
This commit is contained in:
1 parent
1ef405be0a
commit
ad65d80d41
1 file changed
+12
-14
@@ -853,20 +853,18 @@ export async function applyCatalogParentRepair(
|
|||||||
await tx.execute(
|
await tx.execute(
|
||||||
sql`UPDATE ${table} SET parent_id = ${change.to} WHERE id = ${change.id} AND parent_id = ${change.from}`,
|
sql`UPDATE ${table} SET parent_id = ${change.to} WHERE id = ${change.id} AND parent_id = ${change.from}`,
|
||||||
);
|
);
|
||||||
await tx
|
await tx.insert(AdminAuditLog).values({
|
||||||
.insert(AdminAuditLog)
|
userId,
|
||||||
.values({
|
action: "catalog_parent_repair",
|
||||||
userId,
|
target: tableName,
|
||||||
action: "catalog_parent_repair",
|
targetId: change.id,
|
||||||
target: tableName,
|
before: JSON.stringify({ parentId: change.from }),
|
||||||
targetId: change.id,
|
after: JSON.stringify({ parentId: change.to }),
|
||||||
before: JSON.stringify({ parentId: change.from }),
|
diff: JSON.stringify({
|
||||||
after: JSON.stringify({ parentId: change.to }),
|
parentId: { from: change.from, to: change.to },
|
||||||
diff: JSON.stringify({
|
}),
|
||||||
parentId: { from: change.from, to: change.to },
|
createdAt: new Date().toISOString(),
|
||||||
}),
|
});
|
||||||
createdAt: new Date().toISOString(),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return { applied: changes.length };
|
return { applied: changes.length };
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user