remove unfinished score sorting and score display (#2)

* refactor: remove watchlist score sort

* refactor: drop score metadata from ui
This commit is contained in:
2026-04-14 23:01:33 +02:00
committed by GitHub
parent 041d5a113e
commit f0a64f37e6
5 changed files with 3 additions and 17 deletions

View File

@@ -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)