track requesters for builds releases deployments and migrations
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query } from '@nestjs/common';
|
||||
import { Body, Controller, Delete, Get, Param, Patch, Post, Put, Query, Req } from '@nestjs/common';
|
||||
|
||||
import { LinkComponentSourceDto } from '../gitea/dto';
|
||||
import { AppsService } from './apps.service';
|
||||
@@ -83,8 +83,11 @@ export class AppsController {
|
||||
}
|
||||
|
||||
@Post('builds')
|
||||
createBuildJob(@Body() body: CreateBuildJobDto) {
|
||||
return this.appsService.createBuildJob(body);
|
||||
createBuildJob(
|
||||
@Body() body: CreateBuildJobDto,
|
||||
@Req() request: { admin?: { id: string; name: string; email: string } },
|
||||
) {
|
||||
return this.appsService.createBuildJob(body, request.admin);
|
||||
}
|
||||
|
||||
@Patch('builds/:buildJobId/cancel')
|
||||
@@ -134,8 +137,11 @@ export class AppsController {
|
||||
}
|
||||
|
||||
@Post('releases')
|
||||
createRelease(@Body() body: CreateAppReleaseDto) {
|
||||
return this.appsService.createRelease(body);
|
||||
createRelease(
|
||||
@Body() body: CreateAppReleaseDto,
|
||||
@Req() request: { admin?: { id: string; name: string; email: string } },
|
||||
) {
|
||||
return this.appsService.createRelease(body, request.admin);
|
||||
}
|
||||
|
||||
@Delete('releases/:releaseId')
|
||||
@@ -154,8 +160,11 @@ export class AppsController {
|
||||
}
|
||||
|
||||
@Post('deployments')
|
||||
createDeploymentJob(@Body() body: CreateDeploymentJobDto) {
|
||||
return this.appsService.createDeploymentJob(body);
|
||||
createDeploymentJob(
|
||||
@Body() body: CreateDeploymentJobDto,
|
||||
@Req() request: { admin?: { id: string; name: string; email: string } },
|
||||
) {
|
||||
return this.appsService.createDeploymentJob(body, request.admin);
|
||||
}
|
||||
|
||||
@Get('migrations')
|
||||
@@ -169,8 +178,11 @@ export class AppsController {
|
||||
}
|
||||
|
||||
@Post('migrations')
|
||||
createMigrationJob(@Body() body: CreateMigrationJobDto) {
|
||||
return this.appsService.createMigrationJob(body);
|
||||
createMigrationJob(
|
||||
@Body() body: CreateMigrationJobDto,
|
||||
@Req() request: { admin?: { id: string; name: string; email: string } },
|
||||
) {
|
||||
return this.appsService.createMigrationJob(body, request.admin);
|
||||
}
|
||||
|
||||
@Get('runtime-namespaces/:namespace')
|
||||
|
||||
Reference in New Issue
Block a user