prisma orm: all endpoints ok

This commit is contained in:
Davidson Gomes
2024-06-06 17:01:48 -03:00
parent 161814a9e5
commit 51c873c19e
8 changed files with 115 additions and 46 deletions

View File

@@ -1,8 +1,14 @@
import { HttpsProxyAgent } from 'https-proxy-agent';
import { wa } from '../api/types/wa.types';
type Proxy = {
host: string;
password?: string;
port: string;
protocol: string;
username?: string;
};
export function makeProxyAgent(proxy: wa.Proxy | string) {
export function makeProxyAgent(proxy: Proxy | string) {
if (typeof proxy === 'string') {
return new HttpsProxyAgent(proxy);
}