From b527735f6f8a1c99981565fe378f88a8106712a7 Mon Sep 17 00:00:00 2001 From: Matthew Crossman Date: Sun, 31 Jan 2021 12:17:43 +1100 Subject: [PATCH] Fix cookie deletion when removing last sub. --- src/subreddit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subreddit.rs b/src/subreddit.rs index a395740..c34d384 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -93,7 +93,7 @@ pub async fn subscriptions(req: HttpRequest) -> HttpResponse { // Delete cookie if empty, else set if sub_list.is_empty() { - res.del_cookie(&Cookie::named("subscriptions")); + res.del_cookie(&Cookie::build("subscriptions", "").path("/").finish()); } else { res.cookie(Cookie::build("subscriptions", sub_list.join(",")) .path("/")