Minimal linting improvements

This commit is contained in:
2022-02-20 21:19:28 +00:00
parent 545f223a97
commit c03d16878a
10 changed files with 23 additions and 17 deletions

View File

@ -1,7 +1,6 @@
package server
import (
"fmt"
"net/http"
"git.javil.eu/jacob1123/budgeteer"
@ -20,7 +19,7 @@ func (h *Handler) newBudget(c *gin.Context) {
}
if newBudget.Name == "" {
c.AbortWithError(http.StatusNotAcceptable, fmt.Errorf("Budget name is needed"))
c.AbortWithStatusJSON(http.StatusBadRequest, ErrorResponse{"budget name is required"})
return
}