feat: make store use ClientManager

This commit is contained in:
James Houlahan
2020-04-07 09:55:28 +02:00
parent f269be4291
commit 042c340881
43 changed files with 414 additions and 264 deletions

View File

@ -24,7 +24,7 @@ func (store *Store) UserID() string {
// GetSpace returns used and total space in bytes.
func (store *Store) GetSpace() (usedSpace, maxSpace uint, err error) {
apiUser, err := store.api.CurrentUser()
apiUser, err := store.client().CurrentUser()
if err != nil {
return 0, 0, err
}
@ -33,7 +33,7 @@ func (store *Store) GetSpace() (usedSpace, maxSpace uint, err error) {
// GetMaxUpload returns max size of attachment in bytes.
func (store *Store) GetMaxUpload() (uint, error) {
apiUser, err := store.api.CurrentUser()
apiUser, err := store.client().CurrentUser()
if err != nil {
return 0, err
}