mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-02-05 23:06:26 -06:00
feat: prisma and remove mongodb
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Proxy } from '@prisma/client';
|
||||
|
||||
import { Logger } from '../../config/logger.config';
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { ProxyDto } from '../dto/proxy.dto';
|
||||
import { ProxyRaw } from '../models';
|
||||
import { WAMonitoringService } from './monitor.service';
|
||||
|
||||
export class ProxyService {
|
||||
@@ -16,7 +17,7 @@ export class ProxyService {
|
||||
return { proxy: { ...instance, proxy: data } };
|
||||
}
|
||||
|
||||
public async find(instance: InstanceDto): Promise<ProxyRaw> {
|
||||
public async find(instance: InstanceDto): Promise<Proxy> {
|
||||
try {
|
||||
this.logger.verbose('find proxy: ' + instance.instanceName);
|
||||
const result = await this.waMonitor.waInstances[instance.instanceName].findProxy();
|
||||
@@ -27,7 +28,7 @@ export class ProxyService {
|
||||
|
||||
return result;
|
||||
} catch (error) {
|
||||
return { enabled: false, proxy: null };
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user