Minimal linting improvements
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user