move get funcs to db

This commit is contained in:
sentriz
2019-07-05 17:10:11 +01:00
parent 1ab24db5d7
commit b6b3043765
13 changed files with 79 additions and 73 deletions

View File

@@ -31,7 +31,7 @@ func (c *Controller) WithUserSession(next http.HandlerFunc) http.HandlerFunc {
return
}
// take username from sesion and add the user row to the context
user := c.GetUserFromName(username)
user := c.DB.GetUserFromName(username)
if user == nil {
// the username in the client's session no longer relates to a
// user in the database (maybe the user was deleted)