feat: run staticcheck during build and fix errors
All checks were successful
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 46s
Build Docker Image / Build-Docker-Image (push) Successful in 41s

This commit was merged in pull request #285.
This commit is contained in:
2024-11-29 20:23:02 +01:00
parent a62f0fb037
commit e201ac7b2c
6 changed files with 12 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ func (handler IndexHandlerImpl) handle(router *http.ServeMux) {
func (handler IndexHandlerImpl) handleIndexAnd404() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
user, err := handler.service.GetUserFromSessionId(utils.GetSessionID(r))
user, _ := handler.service.GetUserFromSessionId(utils.GetSessionID(r))
var comp templ.Component = nil
userComp := service.UserInfoComp(user)
@@ -48,7 +48,7 @@ func (handler IndexHandlerImpl) handleIndexAnd404() http.HandlerFunc {
comp = template.Layout(template.Index(), userComp, handler.serverSettings.Environment)
}
err = comp.Render(r.Context(), w)
err := comp.Render(r.Context(), w)
if err != nil {
utils.LogError("Failed to render index", err)
http.Error(w, "Failed to render index", http.StatusInternalServerError)