use default null instead of pointer to primary key

This commit is contained in:
sentriz
2019-05-27 11:22:01 +01:00
parent 4b66a84985
commit 601cf560d0
9 changed files with 58 additions and 56 deletions

View File

@@ -61,7 +61,7 @@ func (c *Controller) WithValidSubsonicArgs(next http.HandlerFunc) http.HandlerFu
return
}
user := c.GetUserFromName(username)
if *user.ID == 0 {
if user == nil {
// the user does not exist
respondError(w, r, 40, "invalid username")
return