From b12b3b9d0f9f2b65a7e367d05986dec411165c4a Mon Sep 17 00:00:00 2001 From: maslow Date: Tue, 7 Mar 2023 21:51:22 +0800 Subject: [PATCH] fix(server): bundle limit is invalid, bundleId missing (#870) --- server/prisma/schema.prisma | 5 +++-- server/src/application/application.controller.ts | 2 +- server/src/application/application.service.ts | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 52720caa6e..7e961c6673 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -136,8 +136,9 @@ model Bundle { } model ApplicationBundle { - id String @id @default(auto()) @map("_id") @db.ObjectId - appid String @unique + id String @id @default(auto()) @map("_id") @db.ObjectId + appid String @unique + bundleId String @db.ObjectId name String displayName String resource BundleResource diff --git a/server/src/application/application.controller.ts b/server/src/application/application.controller.ts index 5019e1698a..a97f93db27 100644 --- a/server/src/application/application.controller.ts +++ b/server/src/application/application.controller.ts @@ -64,7 +64,7 @@ export class ApplicationController { where: { createdBy: user.id, bundle: { - id: dto.bundleId, + bundleId: dto.bundleId, }, }, }) diff --git a/server/src/application/application.service.ts b/server/src/application/application.service.ts index fcd5b7d123..28b2814229 100644 --- a/server/src/application/application.service.ts +++ b/server/src/application/application.service.ts @@ -50,6 +50,7 @@ export class ApplicationService { }, bundle: { create: { + bundleId: bundle.id, name: bundle.name, displayName: bundle.displayName, price: bundle.price,