conversion of audios for sending recorded audio, now it is possible to send mp3 audios and not just ogg

This commit is contained in:
Davidson Gomes
2023-06-19 22:28:39 -03:00
parent 631dd01c92
commit b8fa43296d
9 changed files with 36 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ import { Logger } from '../config/logger.config';
const logger = new Logger('Db Connection');
export const db = configService.get<Database>('DATABASE');
const db = configService.get<Database>('DATABASE');
export const dbserver = db.ENABLED
? mongoose.createConnection(db.CONNECTION.URI, {
dbName: db.CONNECTION.DB_PREFIX_NAME + '-whatsapp-api',

View File

@@ -25,6 +25,13 @@ export class RedisCache {
}
}
public async keyExists(key?: string) {
if (key) {
return !!(await this.instanceKeys()).find((i) => i === key);
}
return !!(await this.instanceKeys()).find((i) => i === this.instanceName);
}
public async writeData(field: string, data: any) {
try {
const json = JSON.stringify(data, BufferJSON.replacer);