perf: 优化数据表索引

This commit is contained in:
xiaojunnuo
2024-12-09 15:59:14 +08:00
parent fdb5ea0ff4
commit 228fdf0a0d
3 changed files with 32 additions and 3 deletions

View File

@@ -78,10 +78,9 @@ export class HistoryController extends CrudController<HistoryService> {
@Post('/list', { summary: Constants.per.authOnly })
async list(@Body(ALL) body) {
body.query = body.query ?? {};
const isAdmin = await this.authService.isAdmin(this.ctx);
if (!isAdmin) {
body.query.userId = this.getUserId();
body.userId = this.getUserId();
}
if (body.pipelineId == null) {
return this.ok([]);