mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-19 08:49:07 +00:00
FEAT: update deleteTable endpoint to use pipelineId in path and refactor parameters
This commit is contained in:
+9
-17
@@ -4705,11 +4705,19 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/platform/inputs/{inputId}/tables/{tableName}": {
|
||||
"/platform/pipelines/{pipelineId}/inputs/{inputId}": {
|
||||
"delete": {
|
||||
"operationId": "PlatformApiController_deleteTable",
|
||||
"summary": "Mark a table as deleted and delete its associated job via platform-api",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "pipelineId",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "inputId",
|
||||
"required": true,
|
||||
@@ -4717,22 +4725,6 @@
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tableName",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "pipelineId",
|
||||
"required": true,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -965,15 +965,16 @@ export class PlatformApiController {
|
||||
);
|
||||
}
|
||||
|
||||
@Delete('inputs/:inputId/tables/:tableName')
|
||||
@Delete('pipelines/:pipelineId/inputs/:inputId')
|
||||
@ApiOperation({ summary: 'Mark a table as deleted and delete its associated job via platform-api' })
|
||||
@RequireAllPermissions(PERMISSIONS_GROUPS.PIPELINE.permissions.DELETE)
|
||||
async deleteTable(
|
||||
@Param('pipelineId') pipelineId: string,
|
||||
@Param('inputId') inputId: string,
|
||||
@Param('tableName') tableName: string,
|
||||
@Query('pipelineId') pipelineId: string,
|
||||
@Body() body: { table_name: string },
|
||||
@User() user: RequestUser,
|
||||
) {
|
||||
const tableName = body.table_name;
|
||||
const info = {
|
||||
customer_id: user.customer_id,
|
||||
customer: user.customer_name,
|
||||
|
||||
Reference in New Issue
Block a user