mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-20 13:59:15 +00:00
Fix cookie deletion when removing last sub.
This commit is contained in:
parent
8cc01c58f3
commit
b527735f6f
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ pub async fn subscriptions(req: HttpRequest) -> HttpResponse {
|
||||||
|
|
||||||
// Delete cookie if empty, else set
|
// Delete cookie if empty, else set
|
||||||
if sub_list.is_empty() {
|
if sub_list.is_empty() {
|
||||||
res.del_cookie(&Cookie::named("subscriptions"));
|
res.del_cookie(&Cookie::build("subscriptions", "").path("/").finish());
|
||||||
} else {
|
} else {
|
||||||
res.cookie(Cookie::build("subscriptions", sub_list.join(","))
|
res.cookie(Cookie::build("subscriptions", sub_list.join(","))
|
||||||
.path("/")
|
.path("/")
|
||||||
|
|
Loading…
Add table
Reference in a new issue