mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
refactor(api): Refactor updateOne logic
This commit is contained in:
@@ -167,17 +167,7 @@ export class NlpEntityController extends BaseController<
|
||||
);
|
||||
}
|
||||
|
||||
const result = await this.nlpEntityService.updateOne(
|
||||
id,
|
||||
updateNlpEntityDto,
|
||||
);
|
||||
if (!result) {
|
||||
this.logger.warn(`Failed to update NLP Entity by id ${id}`);
|
||||
throw new InternalServerErrorException(
|
||||
`Failed to update NLP Entity with ID ${id}`,
|
||||
);
|
||||
}
|
||||
return result;
|
||||
return await this.nlpEntityService.updateOne(id, updateNlpEntityDto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user