refactor: prevent update appName in services

This commit is contained in:
Mauricio Siu
2024-12-21 13:10:34 -06:00
parent 8e5b0988cf
commit 0abf62dd52
8 changed files with 16 additions and 16 deletions

View File

@@ -94,11 +94,11 @@ export const updatePostgresById = async (
postgresId: string,
postgresData: Partial<Postgres>,
) => {
const { appName, ...rest } = postgresData;
const result = await db
.update(postgres)
.set({
...postgresData,
appName: cleanAppName(postgresData.appName),
...rest,
})
.where(eq(postgres.postgresId, postgresId))
.returning();