From f46bf4c15e926a3e9a0013f4201fc8e5c4fbdc1e Mon Sep 17 00:00:00 2001 From: Viktoriia Kostyleva Date: Thu, 13 Oct 2022 15:21:16 +0300 Subject: [PATCH] Set default dns on logout --- .../Root/RouteCollections/Wallet/WalletRouteCollection.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Wallet/WalletRouteCollection.swift b/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Wallet/WalletRouteCollection.swift index 1955067..dca953c 100644 --- a/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Wallet/WalletRouteCollection.swift +++ b/SolardVPNCommunityCoreiOS/SOLARdVPNCommunityCoreiOS/Root/RouteCollections/Wallet/WalletRouteCollection.swift @@ -10,7 +10,7 @@ import Vapor import SentinelWallet struct WalletRouteCollection: RouteCollection { - let context: HasSecurityService & HasWalletStorage & HasWalletService + let context: HasSecurityService & HasWalletStorage & HasWalletService & HasDNSServersStorage func boot(routes: RoutesBuilder) throws { routes.get("wallet", use: getWallet) @@ -94,6 +94,9 @@ extension WalletRouteCollection { func deleteWallet(_ req: Request) -> Response { context.resetWalletContext() + + context.dnsServersStorage.set(dns: .default) + return Response() } }