mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
log: removed excessive verbose logs
This commit is contained in:
@@ -19,8 +19,6 @@ export class AuthService {
|
||||
private async apikey(instance: InstanceDto, token?: string) {
|
||||
const apikey = token ? token : v4().toUpperCase();
|
||||
|
||||
this.logger.verbose(token ? 'APIKEY defined: ' + apikey : 'APIKEY created: ' + apikey);
|
||||
|
||||
const db = this.configService.get('DATABASE');
|
||||
|
||||
if (db.ENABLED) {
|
||||
@@ -32,8 +30,6 @@ export class AuthService {
|
||||
},
|
||||
});
|
||||
|
||||
this.logger.verbose('APIKEY saved in database');
|
||||
|
||||
return { apikey };
|
||||
} catch (error) {
|
||||
this.logger.error({
|
||||
@@ -48,22 +44,16 @@ export class AuthService {
|
||||
public async checkDuplicateToken(token: string) {
|
||||
const instances = await this.waMonitor.instanceInfo();
|
||||
|
||||
this.logger.verbose('checking duplicate token');
|
||||
|
||||
const instance = instances.find((instance) => instance.instance.apikey === token);
|
||||
|
||||
if (instance) {
|
||||
throw new BadRequestException('Token already exists');
|
||||
}
|
||||
|
||||
this.logger.verbose('available token');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public async generateHash(instance: InstanceDto, token?: string) {
|
||||
this.logger.verbose('generating hash apiKey to instance: ' + instance.instanceName);
|
||||
|
||||
return (await this.apikey(instance, token)) as { apikey: string };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user