fix(api): remove unused returns

This commit is contained in:
yassinedorbozgithub 2025-06-09 09:55:17 +01:00
parent 9aea582915
commit 22c4fcdfc8
2 changed files with 4 additions and 6 deletions

View File

@ -126,10 +126,10 @@ export default abstract class BaseWebChannelHandler<
try { try {
const menu = await this.menuService.getTree(); const menu = await this.menuService.getTree();
return client.emit('settings', { menu, ...settings }); client.emit('settings', { menu, ...settings });
} catch (err) { } catch (err) {
this.logger.warn('Unable to retrieve menu ', err); this.logger.warn('Unable to retrieve menu ', err);
return client.emit('settings', settings); client.emit('settings', settings);
} }
} catch (err) { } catch (err) {
this.logger.error('Unable to initiate websocket connection', err); this.logger.error('Unable to initiate websocket connection', err);

View File

@ -74,7 +74,7 @@ export class NlpService {
const helper = await this.helperService.getDefaultHelper(HelperType.NLU); const helper = await this.helperService.getDefaultHelper(HelperType.NLU);
const foreignId = await helper.addEntity(entity); const foreignId = await helper.addEntity(entity);
this.logger.debug('New entity successfully synced!', foreignId); this.logger.debug('New entity successfully synced!', foreignId);
return await this.nlpEntityService.updateOne( await this.nlpEntityService.updateOne(
{ _id: entity._id }, { _id: entity._id },
{ {
foreign_id: foreignId, foreign_id: foreignId,
@ -82,7 +82,6 @@ export class NlpService {
); );
} catch (err) { } catch (err) {
this.logger.error('Unable to sync a new entity', err); this.logger.error('Unable to sync a new entity', err);
return entity;
} }
} }
@ -139,7 +138,7 @@ export class NlpService {
const helper = await this.helperService.getDefaultNluHelper(); const helper = await this.helperService.getDefaultNluHelper();
const foreignId = await helper.addValue(value); const foreignId = await helper.addValue(value);
this.logger.debug('New value successfully synced!', foreignId); this.logger.debug('New value successfully synced!', foreignId);
return await this.nlpValueService.updateOne( await this.nlpValueService.updateOne(
{ _id: value._id }, { _id: value._id },
{ {
foreign_id: foreignId, foreign_id: foreignId,
@ -147,7 +146,6 @@ export class NlpService {
); );
} catch (err) { } catch (err) {
this.logger.error('Unable to sync a new value', err); this.logger.error('Unable to sync a new value', err);
return value;
} }
} }