aboutsummaryrefslogtreecommitdiff
path: root/backend/home.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-03 10:23:35 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-03 10:23:35 +0200
commit2d131a363645e4a32e47036742087acc4bf1379f (patch)
tree19bdca3c4acbfcf0c1b6a1e6cb8fb48036e964f1 /backend/home.go
parent0bcfe1f7df5c309f8a4ab381a6fd5b772d929542 (diff)
feat(backend): sort logs with modification date
Diffstat (limited to 'backend/home.go')
-rw-r--r--backend/home.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/backend/home.go b/backend/home.go
index 43ace8a..d223cf5 100644
--- a/backend/home.go
+++ b/backend/home.go
@@ -6,7 +6,6 @@ import (
"net/http"
"slices"
"strconv"
- "time"
"github.com/go-chi/chi/v5"
)
@@ -57,8 +56,8 @@ func HandleHome(r *chi.Mux) {
func sortLogs() {
sortedLogs = slices.SortedFunc(maps.Values(logs), func(l *logData, l2 *logData) int {
- lt := l.pubDate.AsTime(time.UTC)
- l2t := l2.pubDate.AsTime(time.UTC)
+ lt := l.ModAt
+ l2t := l2.ModAt
// we want it reversed
if lt.Before(l2t) {
return 1