webadmin端增加版本号和部署功能
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Controller, Post, UseGuards } from '@nestjs/common';
|
||||
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
||||
import { SuperAdminGuard } from '../../common/guards/super-admin.guard';
|
||||
import { HqOperation } from '../../common/hq-operation/hq-operation.decorator';
|
||||
import { HqOperationAction } from '../../common/hq-operation/hq-operation.constants';
|
||||
import { AdminDeployService } from './admin-deploy.service';
|
||||
|
||||
@Controller('admin/deploy')
|
||||
@UseGuards(HqAuthGuard, SuperAdminGuard)
|
||||
export class AdminDeployController {
|
||||
constructor(private readonly deployService: AdminDeployService) {}
|
||||
|
||||
@Post('trigger')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.DEPLOY_TRIGGER,
|
||||
refType: 'DEPLOY',
|
||||
batch: true,
|
||||
})
|
||||
trigger() {
|
||||
return this.deployService.triggerDeploy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user