fix: list permanent whitelist entries sorted by creation time

Update ListPermEntries to return entry field instead of ip and
sort results by created_at. Update the handler in auth.go to call
ListPermEntries instead of ListTempEntries for the whitelist endpoint.
This commit is contained in:
db123-test
2026-05-04 11:35:02 +03:30
parent 7221feb6d4
commit 39747cc151
2 changed files with 5 additions and 6 deletions

View File

@@ -76,7 +76,7 @@ func whitelistListHandler(cfg Config, db *sql.DB) http.HandlerFunc {
http.Error(w, "unauthorized", http.StatusUnauthorized)
return
}
entries, err := ListTempEntries(db)
entries, err := ListPermEntries(db)
if err != nil {
http.Error(w, "database error", http.StatusInternalServerError)
return