Compare commits

...
2 Commits
Author SHA1 Message Date
Gabriel Amorim 68e5534edb Merge pull request #115 from dadosfera/fix/recreate-input
FIX: recreating input getting id the right way
2022-07-06 11:54:42 -03:00
Gabriel Rosa 51c7bdfebf FIX: recreating input getting id the right way 2022-07-06 11:53:22 -03:00
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ interface Cron {
}
export interface Info {
costumer_id: string;
customer_id: string;
user_id: string;
customer: string;
customer_tier: string;
+3 -3
View File
@@ -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;