💄 Better titles; go fmt

This commit is contained in:
Brian Wiborg 2024-05-13 13:20:26 +02:00
parent b8de119cc6
commit 8f3a5b35c8
No known key found for this signature in database
GPG Key ID: BE53FA9286B719D6
4 changed files with 12 additions and 8 deletions

View File

@ -94,7 +94,9 @@ func handleNewVoting(ctx echo.Context) error {
} }
func handleVotingForm(ctx echo.Context) error { func handleVotingForm(ctx echo.Context) error {
return ctx.Render(http.StatusOK, "voting_form", nil) return ctx.Render(http.StatusOK, "voting_form", map[string]interface{}{
"Title": "cvote",
})
} }
func handleVote(ctx echo.Context) error { func handleVote(ctx echo.Context) error {
@ -122,6 +124,7 @@ func handleVote(ctx echo.Context) error {
} }
store.PlaceVote(id, vid, elector, c) store.PlaceVote(id, vid, elector, c)
return ctx.Render(http.StatusFound, "thanks", map[string]interface{}{ return ctx.Render(http.StatusFound, "thanks", map[string]interface{}{
"Title": "cvote | thx",
"Id": id, "Id": id,
"Vid": vid, "Vid": vid,
}) })
@ -138,6 +141,7 @@ func handleShowVoting(ctx echo.Context) error {
} }
} }
return ctx.Render(http.StatusOK, "voting", map[string]interface{}{ return ctx.Render(http.StatusOK, "voting", map[string]interface{}{
"Title": "cvote | " + v.Referendum(),
"Voting": v, "Voting": v,
}) })
} }