Simplify error responses
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user