mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 15:17:47 +00:00
Fix 'no entry found for key' error
This commit is contained in:
parent
ac5ef89dff
commit
402b3149e1
4 changed files with 110 additions and 14 deletions
|
@ -95,7 +95,7 @@ pub async fn subscriptions(req: HttpRequest) -> HttpResponse {
|
|||
// Modify sub list based on action
|
||||
if action == "subscribe" && !sub_list.contains(&sub) {
|
||||
sub_list.push(sub.to_owned());
|
||||
sub_list.sort_by(|a, b| a.to_lowercase().cmp(&b.to_lowercase()));
|
||||
sub_list.sort_by_key(|a| a.to_lowercase());
|
||||
} else if action == "unsubscribe" {
|
||||
sub_list.retain(|s| s != &sub);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue