fix: 修复流水线分组可以被所有人看见的bug

This commit is contained in:
xiaojunnuo
2024-12-09 02:24:30 +08:00
parent 30ddf5ec41
commit a0e838d1ee
8 changed files with 17 additions and 12 deletions
@@ -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);
}