FS as an interface, close #205

This commit is contained in:
Henrique Dias
2017-08-20 09:21:36 +01:00
parent 76de8e5940
commit 20818dca93
8 changed files with 64 additions and 36 deletions

View File

@@ -30,7 +30,7 @@ func authHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, er
}
// Checks if the user exists.
u, err := c.Store.Users.Get(cred.ID)
u, err := c.Store.Users.Get(cred.ID, c.NewFS)
if err != nil {
return http.StatusForbidden, nil
}
@@ -137,7 +137,7 @@ func validateAuth(c *fm.Context, r *http.Request) (bool, *fm.User) {
return false, nil
}
u, err := c.Store.Users.Get(claims.User.ID)
u, err := c.Store.Users.Get(claims.User.ID, c.NewFS)
if err != nil {
return false, nil
}