feat: run staticcheck during build and fix errors
This commit was merged in pull request #285.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user