From 99db1b1cc3b68f0c2863a8c9065b26188fdb2acf Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 11 Feb 2026 18:17:46 +0800 Subject: [PATCH] chore: history projectId --- .../src/controller/user/pipeline/history-controller.ts | 7 ++++++- .../src/controller/user/pipeline/pipeline-controller.ts | 8 +------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts b/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts index 272e79d92..7c4e10708 100644 --- a/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts +++ b/packages/ui/certd-server/src/controller/user/pipeline/history-controller.ts @@ -89,7 +89,12 @@ export class HistoryController extends CrudController { @Post('/list', { summary: Constants.per.authOnly }) async list(@Body(ALL) body) { const { projectId, userId } = await this.getProjectUserIdRead() - body.query.projectId = projectId + if (!body){ + body = {} + } + if (projectId){ + body.projectId = projectId + } const isAdmin = this.authService.isAdmin(this.ctx); if (!isAdmin) { diff --git a/packages/ui/certd-server/src/controller/user/pipeline/pipeline-controller.ts b/packages/ui/certd-server/src/controller/user/pipeline/pipeline-controller.ts index cc40999b6..40b49c861 100644 --- a/packages/ui/certd-server/src/controller/user/pipeline/pipeline-controller.ts +++ b/packages/ui/certd-server/src/controller/user/pipeline/pipeline-controller.ts @@ -258,13 +258,7 @@ export class PipelineController extends CrudController { @Post('/refreshWebhookKey', { summary: Constants.per.authOnly }) async refreshWebhookKey(@Body('id') id: number) { - - const { projectId } = await this.getProjectUserIdWrite() - if (projectId) { - await this.authService.checkEntityProjectId(this.getService(), projectId, id); - } else { - await this.authService.checkEntityUserId(this.ctx, this.getService(), id); - } + await this.checkEntityOwner(this.getService(), id,"write"); const res = await this.service.refreshWebhookKey(id); return this.ok({ webhookKey: res,