Merge pull request #62 from LazyBachelor/LPM-123

Change priority for WEB
This commit is contained in:
Robin Olsen
2026-03-17 03:25:56 -07:00
committed by GitHub

View File

@@ -2,6 +2,7 @@ package handler
import (
"net/http"
"sort"
"strings"
"github.com/LazyBachelor/LazyPM/internal/models"
@@ -20,6 +21,11 @@ func DashboardHandler(w http.ResponseWriter, r *http.Request) {
return
}
// Sort issues by highest priority first (4 -> 0)
sort.Slice(issues, func(i, j int) bool {
return issues[i].Priority > issues[j].Priority
})
// Check if board view is requested
isBoardView := r.URL.Query().Get("board") == "true"