Skip to content

Commit

Permalink
return id when deleting datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-lansdorf committed Sep 6, 2023
1 parent 24c6a5a commit 05523cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/src/controller/datasource.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ export class DataSourceController implements interfaces.Controller {
body: { description: 'datasource ID request', required: true, model: 'DataSourceIDRequest' },
},
responses: {
200: { description: 'SUCCESS' },
200: {
description: 'SUCCESS',
type: SwaggerDefinitionConstant.Response.Type.OBJECT,
model: 'DataSourceIDRequest',
},
500: { description: 'SERVER ERROR', type: SwaggerDefinitionConstant.Response.Type.OBJECT, model: 'ApiError' },
},
})
Expand All @@ -167,7 +171,7 @@ export class DataSourceController implements interfaces.Controller {
try {
const { id } = req.body as DataSourceIDRequest;
await this.dataSourceService.delete(id, req.locale);
res.json();
res.json({ id });
} catch (err) {
next(err);
}
Expand Down

0 comments on commit 05523cd

Please sign in to comment.