mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
Fix: Resolved issue with connecting to instance
Modified: index.router.ts, whatsapp.baileys.service.ts Fixed an issue with connecting to the instance by modifying the code in index.router.ts and whatsapp.baileys.service.ts. This change resolves a critical problem that was preventing the application from connecting to the necessary instance.
This commit is contained in:
parent
b92a985cf8
commit
9f2801d289
@ -74,6 +74,12 @@ router
|
|||||||
documentation: `https://doc.evolution-api.com`,
|
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('/instance', new InstanceRouter(configService, ...guards).router)
|
||||||
.use('/message', new MessageRouter(...guards).router)
|
.use('/message', new MessageRouter(...guards).router)
|
||||||
.use('/chat', new ChatRouter(...guards).router)
|
.use('/chat', new ChatRouter(...guards).router)
|
||||||
|
@ -416,16 +416,16 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connection === 'connecting') {
|
// if (connection === 'connecting') {
|
||||||
if (this.configService.get<Database>('DATABASE').ENABLED) {
|
// if (this.configService.get<Database>('DATABASE').ENABLED) {
|
||||||
await this.prismaRepository.instance.update({
|
// await this.prismaRepository.instance.update({
|
||||||
where: { id: this.instanceId },
|
// where: { id: this.instanceId },
|
||||||
data: {
|
// data: {
|
||||||
connectionStatus: 'connecting',
|
// connectionStatus: 'connecting',
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (connection === 'open') {
|
if (connection === 'open') {
|
||||||
this.instance.wuid = this.client.user.id.replace(/:\d+/, '');
|
this.instance.wuid = this.client.user.id.replace(/:\d+/, '');
|
||||||
|
Loading…
Reference in New Issue
Block a user