mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-21 03:18:47 +00:00
refactor(application): exclude appName from updateApplication data to streamline database updates
This commit is contained in:
@@ -142,10 +142,11 @@ export const updateApplication = async (
|
|||||||
applicationId: string,
|
applicationId: string,
|
||||||
applicationData: Partial<Application>,
|
applicationData: Partial<Application>,
|
||||||
) => {
|
) => {
|
||||||
|
const { appName, ...rest } = applicationData;
|
||||||
const application = await db
|
const application = await db
|
||||||
.update(applications)
|
.update(applications)
|
||||||
.set({
|
.set({
|
||||||
...applicationData,
|
...rest,
|
||||||
})
|
})
|
||||||
.where(eq(applications.applicationId, applicationId))
|
.where(eq(applications.applicationId, applicationId))
|
||||||
.returning();
|
.returning();
|
||||||
|
|||||||
Reference in New Issue
Block a user