mirror of
https://github.com/spikecodes/libreddit.git
synced 2026-01-06 04:42:33 +01:00
Fix cookie deletion when removing last sub.
This commit is contained in:
@@ -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("/")
|
||||
|
||||
Reference in New Issue
Block a user