fix(api): rename props

This commit is contained in:
yassinedorbozgithub 2025-06-17 15:10:54 +01:00
parent dad6b55789
commit 3ae6b5bc29
2 changed files with 4 additions and 4 deletions

View File

@ -118,8 +118,8 @@ describe('NlpEntityRepository', () => {
it('should delete a nlp entity', async () => { it('should delete a nlp entity', async () => {
nlpValueRepository.eventEmitter.once( nlpValueRepository.eventEmitter.once(
'hook:nlpEntity:preDelete', 'hook:nlpEntity:preDelete',
async (...args) => { async (...[query, criteria]) => {
await nlpService.handleEntityDelete(args[0], args[1]); await nlpService.handleEntityDelete(query, criteria);
}, },
); );
const intentNlpEntity = await nlpEntityRepository.findOne({ const intentNlpEntity = await nlpEntityRepository.findOne({

View File

@ -167,8 +167,8 @@ describe('NlpValueRepository', () => {
it('should delete a nlp Value', async () => { it('should delete a nlp Value', async () => {
nlpValueRepository.eventEmitter.once( nlpValueRepository.eventEmitter.once(
'hook:nlpValue:preDelete', 'hook:nlpValue:preDelete',
async (...args) => { async (...[query, criteria]) => {
await nlpService.handleValueDelete(args[0], args[1]); await nlpService.handleValueDelete(query, criteria);
}, },
); );
const result = await nlpValueRepository.deleteOne(nlpValues[1].id); const result = await nlpValueRepository.deleteOne(nlpValues[1].id);