perf: passkey登录放到下方其他登录位置

This commit is contained in:
xiaojunnuo
2026-03-19 00:14:05 +08:00
parent 68b669d3ff
commit 1413e1aff4
5 changed files with 97 additions and 81 deletions

View File

@@ -190,8 +190,10 @@ export class PipelineController extends CrudController<PipelineService> {
}
@Post('/update', { description: Constants.per.authOnly })
async update(@Body(ALL) bean) {
return await this.save(bean);
async update(@Body(ALL) bean:PipelineEntity) {
await this.checkOwner(this.getService(), bean.id,"write",true);
await this.service.update(bean as any);
return this.ok({});
}
@Post('/save', { description: Constants.per.authOnly, summary: '新增/更新流水线' })

View File

@@ -259,6 +259,9 @@ export class PipelineService extends BaseService<PipelineEntity> {
bean.order = old.order;
bean.userId = old.userId;
bean.projectId = old.projectId;
if (bean.content == null) {
bean.content = old.content;
}
}
if (!old || !old.webhookKey) {
bean.webhookKey = await this.genWebhookKey();