Skip to content

Commit

Permalink
Give better name
Browse files Browse the repository at this point in the history
  • Loading branch information
petyos committed Nov 29, 2023
1 parent aaf7205 commit 11fa290
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion core/auth/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions driven/storage/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 11fa290

Please sign in to comment.