diff --git a/internal/storage/face_gallery_repo.go b/internal/storage/face_gallery_repo.go index 92e0a7a..6625a79 100644 --- a/internal/storage/face_gallery_repo.go +++ b/internal/storage/face_gallery_repo.go @@ -58,7 +58,7 @@ func (r *FaceGalleryRepo) ListPersons() ([]PersonRecord, error) { } defer db.Close() - rows, err := db.Query(`SELECT id, name, created_at FROM face_persons ORDER BY name`) + rows, err := db.Query(`SELECT id, name, created_at FROM face_persons ORDER BY created_at DESC`) if err != nil { return nil, err } @@ -180,3 +180,4 @@ func (r *FaceGalleryRepo) DeletePhoto(photoID int) error { if path != "" { os.Remove(filepath.Join("dataset", path)) } return nil } + diff --git a/internal/web/ui.go b/internal/web/ui.go index 4334a06..d4246b4 100644 --- a/internal/web/ui.go +++ b/internal/web/ui.go @@ -697,6 +697,8 @@ func (u *UI) RegisterAlarmRoutes(r chi.Router) { r.Get("/api/alarms/unacknowledged-count", u.apiAlarmUnacknowledgedCount) r.Get("/api/alarms/daily-count", u.apiAlarmDailyCount) r.Get("/api/alarms/export", u.apiAlarmExport) + r.Get("/api/monitor/channels", u.apiMonitorChannels) + r.Get("/api/device-metrics", u.apiDeviceMetrics) } func (u *UI) Routes() (chi.Router, error) { @@ -839,8 +841,6 @@ func (u *UI) Routes() (chi.Router, error) { r.Post("/face-gallery/sync", u.actionFaceGallerySync) r.Get("/monitor", u.pageMonitor) r.Get("/hls/*", u.proxyHLS) - r.Get("/api/monitor/channels", u.apiMonitorChannels) - r.Get("/api/device-metrics", u.apiDeviceMetrics) r.Get("/recognition", u.pageRecognition) r.Get("/logs", u.pageLogs) diff --git a/safesightd-linux-arm64 b/safesightd-linux-arm64 index 6d25e1c..6d44975 100644 Binary files a/safesightd-linux-arm64 and b/safesightd-linux-arm64 differ