mirror of
https://github.com/hexastack/hexabot
synced 2025-02-02 07:35:38 +00:00
fix: update nlp value controller
This commit is contained in:
parent
b4006f591c
commit
630191c334
@ -168,10 +168,7 @@ export class NlpValueController extends BaseController<
|
||||
@Param('id') id: string,
|
||||
@Body() updateNlpValueDto: NlpValueUpdateDto,
|
||||
): Promise<NlpValue> {
|
||||
const result = await this.nlpValueService.updateOne(id, {
|
||||
...updateNlpValueDto,
|
||||
entity: updateNlpValueDto.entity || undefined,
|
||||
});
|
||||
const result = await this.nlpValueService.updateOne(id, updateNlpValueDto);
|
||||
if (!result) {
|
||||
this.logger.warn(`Unable to update NLP Value by id ${id}`);
|
||||
throw new NotFoundException(`NLP Value with ID ${id} not found`);
|
||||
|
Loading…
Reference in New Issue
Block a user