diff --git a/src/api/routes/index.router.ts b/src/api/routes/index.router.ts index 3a668308..7edc1046 100644 --- a/src/api/routes/index.router.ts +++ b/src/api/routes/index.router.ts @@ -74,6 +74,12 @@ router documentation: `https://doc.evolution-api.com`, }); }) + .post('/verify-creds', authGuard['apikey'], async (req, res) => { + return res.status(HttpStatus.OK).json({ + status: HttpStatus.OK, + message: 'Credentials are valid', + }); + }) .use('/instance', new InstanceRouter(configService, ...guards).router) .use('/message', new MessageRouter(...guards).router) .use('/chat', new ChatRouter(...guards).router) diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 0279043f..c113855a 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -416,16 +416,16 @@ export class BaileysStartupService extends ChannelStartupService { } } - if (connection === 'connecting') { - if (this.configService.get('DATABASE').ENABLED) { - await this.prismaRepository.instance.update({ - where: { id: this.instanceId }, - data: { - connectionStatus: 'connecting', - }, - }); - } - } + // if (connection === 'connecting') { + // if (this.configService.get('DATABASE').ENABLED) { + // await this.prismaRepository.instance.update({ + // where: { id: this.instanceId }, + // data: { + // connectionStatus: 'connecting', + // }, + // }); + // } + // } if (connection === 'open') { this.instance.wuid = this.client.user.id.replace(/:\d+/, '');