mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +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,
|
@Param('id') id: string,
|
||||||
@Body() updateNlpValueDto: NlpValueUpdateDto,
|
@Body() updateNlpValueDto: NlpValueUpdateDto,
|
||||||
): Promise<NlpValue> {
|
): Promise<NlpValue> {
|
||||||
const result = await this.nlpValueService.updateOne(id, {
|
const result = await this.nlpValueService.updateOne(id, updateNlpValueDto);
|
||||||
...updateNlpValueDto,
|
|
||||||
entity: updateNlpValueDto.entity || undefined,
|
|
||||||
});
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
this.logger.warn(`Unable to update NLP Value by id ${id}`);
|
this.logger.warn(`Unable to update NLP Value by id ${id}`);
|
||||||
throw new NotFoundException(`NLP Value with ID ${id} not found`);
|
throw new NotFoundException(`NLP Value with ID ${id} not found`);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user