mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-22 09:09:07 +00:00
FIX: recreating input getting id the right way
This commit is contained in:
@@ -125,7 +125,7 @@ export class InputsController {
|
||||
@Post(':id')
|
||||
@ApiOkResponse({ type: Input })
|
||||
async reCreate(@Param('id') id: string, @Body() input: CreateInputReq) {
|
||||
if (!id) id = id;
|
||||
if (!input.id) input.id = id;
|
||||
this.logger.info(`POST /${id}`, 'ON RECREATE ROUTE');
|
||||
|
||||
const response = await this.inputService.reCreate(input);
|
||||
@@ -163,8 +163,8 @@ export class InputsController {
|
||||
const { id } = params;
|
||||
const { info } = updateInputDto;
|
||||
this.logger.info(`/input/${id} - ON UPDATE ROUTE`, {
|
||||
user: updateInputDto.info.user_id,
|
||||
customer: updateInputDto.info.costumer_id,
|
||||
user: info.user_id,
|
||||
customer: info.customer_id,
|
||||
});
|
||||
delete updateInputDto.info;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user