Skip to content

Commit

Permalink
Set default dns on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
VictoriaKostyleva committed Oct 13, 2022
1 parent 61cb553 commit f46bf4c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -94,6 +94,9 @@ extension WalletRouteCollection {

func deleteWallet(_ req: Request) -> Response {
context.resetWalletContext()

context.dnsServersStorage.set(dns: .default)

return Response()
}
}
Expand Down

0 comments on commit f46bf4c

Please sign in to comment.