🩹 Better response when not eligible to vote
This commit is contained in:
parent
8f3a5b35c8
commit
ff83e9abce
2 changed files with 20 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ func handleShowVoting(ctx echo.Context) error {
|
|||
}
|
||||
if v.Deadline().After(time.Now().UTC()) {
|
||||
if !eligible(ctx.Request().Header.Get("X-Remote-User"), v.Electors()) {
|
||||
return ctx.String(http.StatusForbidden, "")
|
||||
return ctx.Render(http.StatusOK, "not_eligible", nil)
|
||||
}
|
||||
}
|
||||
return ctx.Render(http.StatusOK, "voting", map[string]interface{}{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue