remove unfinished score sorting and score display (#2)
* refactor: remove watchlist score sort * refactor: drop score metadata from ui
This commit is contained in:
@@ -152,7 +152,7 @@ func (h *Handler) HandleGetWatchlist(w http.ResponseWriter, r *http.Request) {
|
||||
sortBy := r.URL.Query().Get("sort")
|
||||
sortOrder := r.URL.Query().Get("order")
|
||||
|
||||
if sortBy != "title" && sortBy != "score" {
|
||||
if sortBy != "title" {
|
||||
sortBy = "date"
|
||||
}
|
||||
if sortOrder != "asc" {
|
||||
@@ -270,11 +270,6 @@ func (h *Handler) sortEntries(entries []database.GetUserWatchListRow, sortBy, so
|
||||
}
|
||||
return !cmp
|
||||
}
|
||||
case "score":
|
||||
less = func(i, j int) bool {
|
||||
// Score is stored as JSON in the DB, for now just keep default order
|
||||
return false
|
||||
}
|
||||
default: // "date"
|
||||
less = func(i, j int) bool {
|
||||
cmp := entries[i].UpdatedAt.After(entries[j].UpdatedAt)
|
||||
|
||||
Reference in New Issue
Block a user