Skip to content

Commit

Permalink
#10: Add DELETE wallet request
Browse files Browse the repository at this point in the history
  • Loading branch information
VictoriaKostyleva committed Oct 5, 2022
1 parent d42be55 commit 11b4cf5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct WalletRouteCollection: RouteCollection {
routes.get("wallet", use: getWallet)
routes.put("wallet", use: putWallet)
routes.post("wallet", use: postWallet)
routes.delete("wallet", use: deleteWallet)
}
}

Expand Down Expand Up @@ -85,6 +86,11 @@ extension WalletRouteCollection {
}
})
}

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

// MARK: - Private
Expand Down

0 comments on commit 11b4cf5

Please sign in to comment.