Add endpoint to retrieve user by userId

This commit is contained in:
Marcos Lilljedahl
2017-10-16 19:43:56 -03:00
parent 1b0d363ffe
commit 4850a7b496
3 changed files with 25 additions and 1 deletions

View File

@@ -351,7 +351,7 @@ func (store *storage) UserPut(user *types.User) error {
store.db.UsersByProvider[fmt.Sprintf("%s_%s", user.Provider, user.ProviderUserId)] = user.Id
store.db.Users[user.Id] = user
return nil
return store.save()
}
func (store *storage) UserGet(id string) (*types.User, error) {
store.rw.Lock()