mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 03:56:54 -06:00
Added suggestions by @sourcery-ai
This commit is contained in:
parent
bbbe667cfa
commit
460c893c3a
@ -4,7 +4,9 @@ import { Logger } from '@config/logger.config';
|
||||
const logger = new Logger('PGPATH2MYSQL');
|
||||
|
||||
function convertPgPathToMysql (path) {
|
||||
if (!Array.isArray(path)) return path
|
||||
if (!Array.isArray(path)) {
|
||||
return path
|
||||
}
|
||||
let result = '$'
|
||||
for (const item of path) {
|
||||
if (/^\d+$/.test(item)) {
|
||||
|
@ -1509,7 +1509,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
remoteJid: key.remoteJid,
|
||||
fromMe: key.fromMe,
|
||||
participant: key?.remoteJid,
|
||||
status: status[update.status] || findMessage.status,
|
||||
status: status[update.status] ?? findMessage.status,
|
||||
pollUpdates,
|
||||
instanceId: this.instanceId,
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ if (configService.get<ProviderSession>('PROVIDER').ENABLED) {
|
||||
|
||||
const provider = configService.get<Database>('DATABASE').PROVIDER;
|
||||
let extendablePrismaRepository: PrismaRepository = new PrismaRepository(configService)
|
||||
if (provider === "mysql") {
|
||||
if (typeof provider === 'string' && provider?.toLowerCase() === 'mysql') {
|
||||
extendablePrismaRepository = extendsWithProxy(extendablePrismaRepository, pgPathToMysql);
|
||||
}
|
||||
export const prismaRepository = extendablePrismaRepository;
|
||||
|
Loading…
Reference in New Issue
Block a user