mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: NLP Value update DTO
This commit is contained in:
parent
bac79cd74a
commit
16e34531b0
@ -168,7 +168,10 @@ export class NlpValueController extends BaseController<
|
||||
@Param('id') id: string,
|
||||
@Body() updateNlpValueDto: NlpValueUpdateDto,
|
||||
): Promise<NlpValue> {
|
||||
const result = await this.nlpValueService.updateOne(id, updateNlpValueDto);
|
||||
const result = await this.nlpValueService.updateOne(id, {
|
||||
...updateNlpValueDto,
|
||||
entity: updateNlpValueDto.entity || undefined,
|
||||
});
|
||||
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