diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..61a8b42 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,25 @@ +version: "3.8" + +services: + app: + build: . + restart: unless-stopped + ports: + - 3000:3000 + environment: + - KC_URL=http://192.168.1.20:8080 + - KC_REALM=dev + - KC_SERVICE_ACCOUNT_CLIENT_ID= + - KC_SERVICE_ACCOUNT_SECRET= + - APP_HOST=0.0.0.0 + - APP_PORT=3000 + - MINIO_HOST=192.168.1.20 + - MINIO_PORT=9000 + - MINIO_ACCESS_KEY= + - MINIO_SECRET_KEY= + - MINIO_BUCKET=jws-dev + - ELASTICSEARCH_PROTOCOL=http + - ELASTICSEARCH_HOST=192.168.1.20 + - ELASTICSEARCH_PORT=9200 + - ELASTICSEARCH_INDEX=jws-log-index + - DATABASE_URL=postgresql://postgres:1234@192.168.1.20:5432/dev_1?schema=public diff --git a/src/controllers/branch/user-controller.ts b/src/controllers/branch/user-controller.ts index 9dcf8c5..1ae434b 100644 --- a/src/controllers/branch/user-controller.ts +++ b/src/controllers/branch/user-controller.ts @@ -196,9 +196,9 @@ export class UserBranchController extends Controller { } @Delete() - async deleteUserBranch(@Path() userId: string, @Body() body: BranchUserBody) { + async deleteUserBranch(@Path() userId: string, @Body() body: UserBranchBody) { await prisma.$transaction( - body.user.map((v) => prisma.branchUser.deleteMany({ where: { userId, branchId: v } })), + body.branch.map((v) => prisma.branchUser.deleteMany({ where: { userId, branchId: v } })), ); }