|
@@ -29,20 +29,20 @@ export class DictDataController {
|
|
|
}
|
|
|
|
|
|
@Get('/:id')
|
|
|
- async fetch(@Param('id') id: string) {
|
|
|
- const result = await this.service.findOne({ id });
|
|
|
+ async fetch(@Param('id') _id: string) {
|
|
|
+ const result = await this.service.findOne({ _id });
|
|
|
return RF.success(result);
|
|
|
}
|
|
|
|
|
|
@Post('/:id')
|
|
|
- async update(@Param('id') id: string, @Body() body) {
|
|
|
- const result = await this.service.update({ id }, body);
|
|
|
- return RF.success(result)
|
|
|
+ async update(@Param('id') _id: string, @Body() body) {
|
|
|
+ const result = await this.service.update({ _id }, body);
|
|
|
+ return RF.success(result);
|
|
|
}
|
|
|
|
|
|
@Del('/:id')
|
|
|
- async delete(@Param('id') id: string) {
|
|
|
- await this.service.delete({ id });
|
|
|
- return RF.success()
|
|
|
+ async delete(@Param('id') _id: string) {
|
|
|
+ await this.service.delete({ _id });
|
|
|
+ return RF.success();
|
|
|
}
|
|
|
}
|