diff --git a/packages/libs/lib-server/src/basic/base-controller.ts b/packages/libs/lib-server/src/basic/base-controller.ts index 7b58cd6c2..e09f30b32 100644 --- a/packages/libs/lib-server/src/basic/base-controller.ts +++ b/packages/libs/lib-server/src/basic/base-controller.ts @@ -118,7 +118,7 @@ export abstract class BaseController { if(allowAdmin){ await authService.checkUserIdButAllowAdmin(this.ctx, service, id); }else{ - await authService.checkUserId(this.ctx, service, id); + await authService.checkUserId( service, id, userId); } } return {projectId,userId} diff --git a/packages/ui/certd-server/src/config/config.default.ts b/packages/ui/certd-server/src/config/config.default.ts index 6c458b67e..47179e276 100644 --- a/packages/ui/certd-server/src/config/config.default.ts +++ b/packages/ui/certd-server/src/config/config.default.ts @@ -80,7 +80,7 @@ const development = { type: 'better-sqlite3', database: './data/db.sqlite', synchronize: false, // 如果第一次使用,不存在表,有同步的需求可以写 true - logging: false, + logging: true, highlightSql: false, // 配置实体模型 或者 entities: '/entity', diff --git a/packages/ui/certd-server/src/modules/pipeline/service/notification-service.ts b/packages/ui/certd-server/src/modules/pipeline/service/notification-service.ts index a6504720f..1636c6ffa 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/notification-service.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/notification-service.ts @@ -138,21 +138,21 @@ export class NotificationService extends BaseService { if (userId==null) { throw new ValidateException('userId不能为空'); } + const query:any = { + userId, + } + if (projectId){ + query.projectId = projectId + } await this.repository.update( - { - userId, - projectId, - }, + query, { isDefault: false, } ); + query.id = id await this.repository.update( - { - id, - userId, - projectId, - }, + query, { isDefault: true, }