Update SaveUsers and SaveGroups to SaveAccount (#2362)

Changed SaveUsers and SaveGroups method calls to SaveAccount for consistency in data persistence operations.
This commit is contained in:
Bethuel Mmbaga 2024-07-31 19:48:12 +03:00 committed by GitHub
parent 165988429c
commit c832cef44c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ func (am *DefaultAccountManager) SaveGroups(ctx context.Context, accountID, user
}
account.Network.IncSerial()
if err = am.Store.SaveGroups(account.Id, account.Groups); err != nil {
if err = am.Store.SaveAccount(ctx, account); err != nil {
return err
}

View File

@ -859,7 +859,7 @@ func (am *DefaultAccountManager) SaveOrAddUsers(ctx context.Context, accountID,
}
account.Network.IncSerial()
if err = am.Store.SaveUsers(account.Id, account.Users); err != nil {
if err = am.Store.SaveAccount(ctx, account); err != nil {
return nil, err
}