Simplify error responses

This commit is contained in:
Deluan
2020-10-27 15:23:29 -04:00
parent 0f418a93cd
commit 4777cf0aba
14 changed files with 126 additions and 122 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ func NewUsersController() *UsersController {
// TODO This is a placeholder. The real one has to read this info from a config file or the database
func (c *UsersController) GetUser(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
user, err := requiredParamString(r, "username", "Required string parameter 'username' is not present")
user, err := requiredParamString(r, "username")
if err != nil {
return nil, err
}