fix(core.gbapp): Fixing missing await calls.

This commit is contained in:
Rodrigo Rodriguez 2020-11-09 19:04:01 -03:00
parent 7e001a5cb0
commit e0b18c00f1

View file

@ -220,10 +220,10 @@ export class GBCoreService implements IGBCoreService {
[Op.or]: and [Op.or]: and
} }
}; };
return GuaribasInstance.findAll(options); return await GuaribasInstance.findAll(options);
} else { } else {
const options = { where: { state: 'active' } }; const options = { where: { state: 'active' } };
return GuaribasInstance.findAll(options); return await GuaribasInstance.findAll(options);
} }
} }
@ -243,7 +243,7 @@ export class GBCoreService implements IGBCoreService {
public async loadInstanceById(instanceId: number): Promise<IGBInstance> { public async loadInstanceById(instanceId: number): Promise<IGBInstance> {
const options = { where: { instanceId: instanceId, state: 'active' } }; const options = { where: { instanceId: instanceId, state: 'active' } };
return GuaribasInstance.findOne(options); return await GuaribasInstance.findOne(options);
} }
/** /**
* Loads just one Bot instance. * Loads just one Bot instance.