mirror of
https://github.com/certd/certd.git
synced 2026-05-18 06:17:31 +08:00
fix: 修复流水线分组可以被所有人看见的bug
This commit is contained in:
@@ -36,7 +36,8 @@ export class PipelineGroupController extends CrudController<PipelineGroupService
|
||||
|
||||
@Post('/list', { summary: Constants.per.authOnly })
|
||||
async list(@Body(ALL) body: any) {
|
||||
body.userId = this.getUserId();
|
||||
body.query = body.query ?? {};
|
||||
body.query.userId = this.getUserId();
|
||||
return await super.list(body);
|
||||
}
|
||||
|
||||
@@ -67,7 +68,9 @@ export class PipelineGroupController extends CrudController<PipelineGroupService
|
||||
@Post('/all', { summary: Constants.per.authOnly })
|
||||
async all() {
|
||||
const list: any = await this.service.find({
|
||||
userId: this.getUserId(),
|
||||
where: {
|
||||
userId: this.getUserId(),
|
||||
},
|
||||
});
|
||||
return this.ok(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user