fix errors.

This commit is contained in:
Miroslav Šedivý 2023-01-13 00:11:00 +01:00
parent af95cb4d72
commit 2ff8d84ba2
2 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ func (provider *MemberProviderCtx) Insert(username string, password string, prof
}
func (provider *MemberProviderCtx) UpdateProfile(id string, profile types.MemberProfile) error {
return errors.New("cannot update user profile in multiuser mode")
return nil
}
func (provider *MemberProviderCtx) UpdatePassword(id string, password string) error {
@ -88,7 +88,7 @@ func (provider *MemberProviderCtx) Select(id string) (types.MemberProfile, error
}
func (provider *MemberProviderCtx) SelectAll(limit int, offset int) (map[string]types.MemberProfile, error) {
return map[string]types.MemberProfile{}, errors.New("cannot select users in multiuser mode")
return map[string]types.MemberProfile{}, nil
}
func (provider *MemberProviderCtx) Delete(id string) error {

View File

@ -55,11 +55,11 @@ func (provider *MemberProviderCtx) Insert(username string, password string, prof
}
func (provider *MemberProviderCtx) UpdateProfile(id string, profile types.MemberProfile) error {
return errors.New("cannot update user profile in noauth mode")
return nil
}
func (provider *MemberProviderCtx) UpdatePassword(id string, password string) error {
return errors.New("password can only be modified in config while in noauth mode")
return errors.New("noauth mode does not have password")
}
func (provider *MemberProviderCtx) Select(id string) (types.MemberProfile, error) {
@ -67,7 +67,7 @@ func (provider *MemberProviderCtx) Select(id string) (types.MemberProfile, error
}
func (provider *MemberProviderCtx) SelectAll(limit int, offset int) (map[string]types.MemberProfile, error) {
return map[string]types.MemberProfile{}, errors.New("cannot select users in noauth mode")
return map[string]types.MemberProfile{}, nil
}
func (provider *MemberProviderCtx) Delete(id string) error {