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

@@ -76,11 +76,11 @@ export const updateMySqlById = async (
mysqlId: string,
mysqlData: Partial<MySql>,
) => {
const { appName, ...rest } = mysqlData;
const result = await db
.update(mysql)
.set({
...mysqlData,
appName: cleanAppName(mysqlData.appName),
...rest,
})
.where(eq(mysql.mysqlId, mysqlId))
.returning();