Skip to content

Commit 05523cd

Browse files
return id when deleting datasource
1 parent 24c6a5a commit 05523cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

api/src/controller/datasource.controller.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ export class DataSourceController implements interfaces.Controller {
154154
body: { description: 'datasource ID request', required: true, model: 'DataSourceIDRequest' },
155155
},
156156
responses: {
157-
200: { description: 'SUCCESS' },
157+
200: {
158+
description: 'SUCCESS',
159+
type: SwaggerDefinitionConstant.Response.Type.OBJECT,
160+
model: 'DataSourceIDRequest',
161+
},
158162
500: { description: 'SERVER ERROR', type: SwaggerDefinitionConstant.Response.Type.OBJECT, model: 'ApiError' },
159163
},
160164
})
@@ -167,7 +171,7 @@ export class DataSourceController implements interfaces.Controller {
167171
try {
168172
const { id } = req.body as DataSourceIDRequest;
169173
await this.dataSourceService.delete(id, req.locale);
170-
res.json();
174+
res.json({ id });
171175
} catch (err) {
172176
next(err);
173177
}

0 commit comments

Comments
 (0)