Skip to content

Commit 692927b

Browse files
retlehsclaude
andcommitted
Fix current build not showing on admin dashboard
CurrentBuild was set as a top-level map key but the template reads it from the Stats struct. Set it on the struct instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a738591 commit 692927b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

internal/http/handlers.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,18 @@ func handleAdminDashboard(a *app.App, tmpl *templateSet) http.HandlerFunc {
249249
return func(w http.ResponseWriter, r *http.Request) {
250250
stats := queryDashboardStats(r.Context(), a.DB)
251251

252-
// Get current build
252+
// Get current build — set it on the Stats struct
253253
currentBuild, _ := deploy.CurrentBuildID("storage/repository")
254-
stats["CurrentBuild"] = currentBuild
254+
s := stats["Stats"].(struct {
255+
TotalPackages int64
256+
ActivePlugins int64
257+
ActiveThemes int64
258+
TotalInstalls int64
259+
Installs30d int64
260+
CurrentBuild string
261+
})
262+
s.CurrentBuild = currentBuild
263+
stats["Stats"] = s
255264

256265
render(w, tmpl.adminDashboard, "admin_layout", stats)
257266
}

0 commit comments

Comments
 (0)