feat(filters): sort by created and updated (#1751)

* feat(web): sort by date

* feat(filters): sort by created_at and updated_at

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
martylukyy 2024-10-04 15:02:27 +02:00 committed by GitHub
parent 5e6c4b16c5
commit 009647fcd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -71,7 +71,7 @@ func (h filterHandler) getFilters(w http.ResponseWriter, r *http.Request) {
order := ""
s := strings.Split(sort, "-")
if s[0] == "name" || s[0] == "priority" {
if s[0] == "name" || s[0] == "priority" || s[0] == "created_at" || s[0] == "updated_at" {
field = s[0]
}