mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
chore: vip label translate
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {ALL, Body, Controller, Inject, Post, Provide, Query} from '@midwayjs/core';
|
||||
import {Constants, CrudController} from '@certd/lib-server';
|
||||
import { TemplateService } from '../../../modules/pipeline/service/template-service.js';
|
||||
import { checkPlus } from '@certd/plus-core';
|
||||
|
||||
/**
|
||||
* 流水线模版
|
||||
@@ -42,6 +43,7 @@ export class TemplateController extends CrudController<TemplateService> {
|
||||
@Post('/add', { summary: Constants.per.authOnly })
|
||||
async add(@Body(ALL) bean) {
|
||||
bean.userId = this.getUserId();
|
||||
checkPlus()
|
||||
return super.add(bean);
|
||||
}
|
||||
|
||||
@@ -77,6 +79,7 @@ export class TemplateController extends CrudController<TemplateService> {
|
||||
@Post('/createPipelineByTemplate', { summary: Constants.per.authOnly })
|
||||
async createPipelineByTemplate(@Body(ALL) body: any) {
|
||||
body.userId = this.getUserId();
|
||||
checkPlus()
|
||||
const res = await this.service.createPipelineByTemplate(body);
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user