fix: use $.CSRFField in dashboard template range loop (closes #146)

Inside the {{range .AppStats}} block, the dot context is *AppStats,
not the root template data. Use $ to access the root-level CSRFField
added by addGlobals.
This commit is contained in:
clawbot
2026-02-26 02:55:53 -08:00
parent 4b9c99b267
commit 4f687aab4d

View File

@@ -69,7 +69,7 @@
<a href="/apps/{{.App.ID}}" class="btn-text text-sm py-1 px-2">View</a>
<a href="/apps/{{.App.ID}}/edit" class="btn-secondary text-sm py-1 px-2">Edit</a>
<form method="POST" action="/apps/{{.App.ID}}/deploy" class="inline">
{{ .CSRFField }}
{{ $.CSRFField }}
<button type="submit" class="btn-success text-sm py-1 px-2">Deploy</button>
</form>
</div>