diff --git a/api/src/extensions/channels/web/base-web-channel.ts b/api/src/extensions/channels/web/base-web-channel.ts index 97ab1944..7dd143a8 100644 --- a/api/src/extensions/channels/web/base-web-channel.ts +++ b/api/src/extensions/channels/web/base-web-channel.ts @@ -126,10 +126,10 @@ export default abstract class BaseWebChannelHandler< try { const menu = await this.menuService.getTree(); - return client.emit('settings', { menu, ...settings }); + client.emit('settings', { menu, ...settings }); } catch (err) { this.logger.warn('Unable to retrieve menu ', err); - return client.emit('settings', settings); + client.emit('settings', settings); } } catch (err) { this.logger.error('Unable to initiate websocket connection', err); diff --git a/api/src/nlp/services/nlp.service.ts b/api/src/nlp/services/nlp.service.ts index 1c2c1f34..ff59ee9b 100644 --- a/api/src/nlp/services/nlp.service.ts +++ b/api/src/nlp/services/nlp.service.ts @@ -65,7 +65,6 @@ export class NlpService { * Handles the event triggered when a new NLP entity is created. Synchronizes the entity with the external NLP provider. * * @param entity - The NLP entity to be created. - * @returns The updated entity after synchronization. */ @OnEvent('hook:nlpEntity:create') async handleEntityCreate(entity: NlpEntityDocument) { @@ -74,7 +73,7 @@ export class NlpService { const helper = await this.helperService.getDefaultHelper(HelperType.NLU); const foreignId = await helper.addEntity(entity); this.logger.debug('New entity successfully synced!', foreignId); - return await this.nlpEntityService.updateOne( + await this.nlpEntityService.updateOne( { _id: entity._id }, { foreign_id: foreignId, @@ -82,7 +81,6 @@ export class NlpService { ); } catch (err) { this.logger.error('Unable to sync a new entity', err); - return entity; } } @@ -129,8 +127,6 @@ export class NlpService { * Handles the event triggered when a new NLP value is created. Synchronizes the value with the external NLP provider. * * @param value - The NLP value to be created. - * - * @returns The updated value after synchronization. */ @OnEvent('hook:nlpValue:create') async handleValueCreate(value: NlpValueDocument) { @@ -139,7 +135,7 @@ export class NlpService { const helper = await this.helperService.getDefaultNluHelper(); const foreignId = await helper.addValue(value); this.logger.debug('New value successfully synced!', foreignId); - return await this.nlpValueService.updateOne( + await this.nlpValueService.updateOne( { _id: value._id }, { foreign_id: foreignId, @@ -147,7 +143,6 @@ export class NlpService { ); } catch (err) { this.logger.error('Unable to sync a new value', err); - return value; } }