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

@@ -72,11 +72,11 @@ export const updateMongoById = async (
mongoId: string,
mongoData: Partial<Mongo>,
) => {
const { appName, ...rest } = mongoData;
const result = await db
.update(mongo)
.set({
...mongoData,
appName: cleanAppName(mongoData.appName),
...rest,
})
.where(eq(mongo.mongoId, mongoId))
.returning();