mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-04 20:30:37 +00:00
Unify preferences under one struct
This commit is contained in:
parent
b13874d0db
commit
ef2f9ad12b
4 changed files with 15 additions and 21 deletions
|
@ -24,7 +24,7 @@ pub async fn item(req: HttpRequest) -> HttpResponse {
|
|||
let mut sort: String = param(&path, "sort");
|
||||
|
||||
// Grab default comment sort method from Cookies
|
||||
let default_sort = cookie(req.to_owned(), "comment_sort");
|
||||
let default_sort = cookie(&req, "comment_sort");
|
||||
|
||||
// If there's no sort query but there's a default sort, set sort to default_sort
|
||||
if sort.is_empty() && !default_sort.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue