Bankkonto-Aktualisierung über zentralen Dienst reparieren
All checks were successful
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 22s
Build and Push Docker Images / build-backend (push) Successful in 44s
Build and Push Docker Images / build-frontend (push) Successful in 1m13s
Build and Push Docker Images / build-central-services-api (push) Successful in 21s

This commit is contained in:
root
2026-09-01 12:24:34 +00:00
parent 98a8d1d061
commit 2428230d94
5 changed files with 62 additions and 23 deletions

View File

@@ -1129,9 +1129,17 @@ export default async function resourceRoutes(server: FastifyInstance) {
return reply.code(404).send({ error: "Resource not found" })
}
let data: Record<string, any> = { ...body, updated_at: new Date().toISOString(), updated_by: userId }
//@ts-ignore
delete data.updatedBy; delete data.updatedAt;
let data: Record<string, any> = { ...body }
delete data.updatedAt
delete data.updated_at
delete data.updatedBy
delete data.updated_by
const updatedAt = new Date()
if (Object.prototype.hasOwnProperty.call(table, "updatedAt")) data.updatedAt = updatedAt
if (Object.prototype.hasOwnProperty.call(table, "updated_at")) data.updated_at = updatedAt
if (Object.prototype.hasOwnProperty.call(table, "updatedBy")) data.updatedBy = userId
if (Object.prototype.hasOwnProperty.call(table, "updated_by")) data.updated_by = userId
if (resource === "filetags") {
delete data.isSystemUsed
@@ -1144,9 +1152,11 @@ export default async function resourceRoutes(server: FastifyInstance) {
if (portalCustomerId) {
data = {
...sanitizePortalCustomerUpdate(data),
updated_at: data.updated_at,
updated_by: data.updated_by,
}
if (Object.prototype.hasOwnProperty.call(table, "updatedAt")) data.updatedAt = updatedAt
if (Object.prototype.hasOwnProperty.call(table, "updated_at")) data.updated_at = updatedAt
if (Object.prototype.hasOwnProperty.call(table, "updatedBy")) data.updatedBy = userId
if (Object.prototype.hasOwnProperty.call(table, "updated_by")) data.updated_by = userId
}
if (resource === "members") {
@@ -1162,9 +1172,11 @@ export default async function resourceRoutes(server: FastifyInstance) {
if (prepared.error) return reply.code(400).send({ error: prepared.error })
data = {
...prepared.data,
updated_at: data.updated_at,
updated_by: data.updated_by,
}
if (Object.prototype.hasOwnProperty.call(table, "updatedAt")) data.updatedAt = updatedAt
if (Object.prototype.hasOwnProperty.call(table, "updated_at")) data.updated_at = updatedAt
if (Object.prototype.hasOwnProperty.call(table, "updatedBy")) data.updatedBy = userId
if (Object.prototype.hasOwnProperty.call(table, "updated_by")) data.updated_by = userId
}
if (resource === "costcentres") {