feat: add reloadkeys method

This commit is contained in:
James Houlahan
2020-06-16 11:28:11 +02:00
parent f3e6af5571
commit 9241a9bdbf
10 changed files with 80 additions and 49 deletions

View File

@ -63,6 +63,14 @@ func (api *FakePMAPI) Unlock(passphrase []byte) (err error) {
return nil
}
func (api *FakePMAPI) ReloadKeys(passphrase []byte) (err error) {
if _, err = api.UpdateUser(); err != nil {
return
}
return api.Unlock(passphrase)
}
func (api *FakePMAPI) CurrentUser() (*pmapi.User, error) {
return api.UpdateUser()
}