FIX: deprecating old pipeline routes

This commit is contained in:
Gabriel Rosa
2023-02-08 18:07:06 -03:00
parent 8043635b1c
commit 9fcbeda470
6 changed files with 171 additions and 52 deletions
+11 -1
View File
@@ -1,5 +1,5 @@
import { Body, Controller, Get, Inject, Param, Post } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import {
AuthenticateCondition,
Authenticated,
@@ -42,6 +42,11 @@ export class PipelinesController {
}
@Post('start/:id')
@ApiOperation({
deprecated: true,
description:
'This method is deprecated. Please use route /pipelinesV2/start/:id instead',
})
async activate(@Param() params, @Body() body) {
const { id } = params;
const { info } = body;
@@ -60,6 +65,11 @@ export class PipelinesController {
}
@Get(':id/status')
@ApiOperation({
deprecated: true,
description:
'This method is deprecated. Please use route /pipelinesV2/:id/status instead',
})
async getPipelineStatus(@Body() body, @Param() params) {
const { id } = params;
body.id = id;