From 11fa290da5d3b42a902b69d103488c00ead93bae Mon Sep 17 00:00:00 2001 From: Petyo Stoyanov Date: Wed, 29 Nov 2023 12:40:31 +0200 Subject: [PATCH] Give better name --- core/auth/auth.go | 2 +- core/auth/interfaces.go | 2 +- driven/storage/adapter.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/auth/auth.go b/core/auth/auth.go index 24d490e3e..0270ea1a6 100644 --- a/core/auth/auth.go +++ b/core/auth/auth.go @@ -1943,7 +1943,7 @@ func (a *Auth) deleteAccountFromApps(context storage.TransactionContext, account } } - err := a.storage.DeleteOrgAppsMembershipsObject(context, account.ID, membershipsIDs) + err := a.storage.DeleteOrgAppsMemberships(context, account.ID, membershipsIDs) if err != nil { return errors.WrapErrorAction(logutils.ActionDelete, model.TypeAccount, nil, err) } diff --git a/core/auth/interfaces.go b/core/auth/interfaces.go index 9066c361a..02370fac8 100644 --- a/core/auth/interfaces.go +++ b/core/auth/interfaces.go @@ -487,7 +487,7 @@ type Storage interface { SaveAccount(context storage.TransactionContext, account *model.Account) error DeleteAccount(context storage.TransactionContext, id string) error UpdateAccountUsageInfo(context storage.TransactionContext, accountID string, updateLoginTime bool, updateAccessTokenTime bool, clientVersion *string) error - DeleteOrgAppsMembershipsObject(context storage.TransactionContext, accountID string, membershipsIDs []string) error + DeleteOrgAppsMemberships(context storage.TransactionContext, accountID string, membershipsIDs []string) error //Profiles UpdateAccountProfile(context storage.TransactionContext, profile model.Profile) error diff --git a/driven/storage/adapter.go b/driven/storage/adapter.go index 51cc14c9b..7d20319f4 100644 --- a/driven/storage/adapter.go +++ b/driven/storage/adapter.go @@ -2322,8 +2322,8 @@ func (sa *Adapter) DeleteAccountRoles(context TransactionContext, accountID stri return nil } -// DeleteOrgAppsMembershipsObject delete the whole account org_apps_memberships object -func (sa *Adapter) DeleteOrgAppsMembershipsObject(context TransactionContext, accountID string, membershipsIDs []string) error { +// DeleteOrgAppsMemberships deletes org apps memberships from the account +func (sa *Adapter) DeleteOrgAppsMemberships(context TransactionContext, accountID string, membershipsIDs []string) error { //filter filter := bson.D{ primitive.E{Key: "_id", Value: accountID},