mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 11:22:21 -06:00
fix: fixed proxy config in manager
This commit is contained in:
@@ -89,7 +89,7 @@ export class EventController {
|
||||
instanceId: this.monitor.waInstances[instanceName].instanceId,
|
||||
},
|
||||
update: {
|
||||
...data,
|
||||
...data[this.name],
|
||||
},
|
||||
create: {
|
||||
enabled: data[this.name]?.enabled,
|
||||
|
||||
@@ -353,8 +353,19 @@ export class ChannelStartupService {
|
||||
}
|
||||
|
||||
public async setProxy(data: ProxyDto) {
|
||||
await this.prismaRepository.proxy.create({
|
||||
data: {
|
||||
await this.prismaRepository.proxy.upsert({
|
||||
where: {
|
||||
instanceId: this.instanceId,
|
||||
},
|
||||
update: {
|
||||
enabled: data?.enabled,
|
||||
host: data.host,
|
||||
port: data.port,
|
||||
protocol: data.protocol,
|
||||
username: data.username,
|
||||
password: data.password,
|
||||
},
|
||||
create: {
|
||||
enabled: data?.enabled,
|
||||
host: data.host,
|
||||
port: data.port,
|
||||
|
||||
Reference in New Issue
Block a user