working commit
This commit is contained in:
+2
-22
@@ -121,17 +121,7 @@ func (oper *Operator) GetAccount(ctx context.Context, params *GetAccountParams)
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
for _, grantDescrs := range grantDescrs {
|
||||
grantShorts := descr.Grant{
|
||||
Right: grantDescrs.Right,
|
||||
Pattern: grantDescrs.Pattern,
|
||||
CreatedAt: grantDescrs.CreatedAt,
|
||||
UpdatedAt: grantDescrs.UpdatedAt,
|
||||
CreatedBy: grantDescrs.CreatedBy,
|
||||
UpdatedBy: grantDescrs.UpdatedBy,
|
||||
}
|
||||
accountShort.Grants = append(accountShort.Grants, grantShorts)
|
||||
}
|
||||
accountShort.Grants = grantDescrs
|
||||
|
||||
res.Account = accountShort
|
||||
return res, err
|
||||
@@ -289,17 +279,7 @@ func (oper *Operator) ListAccounts(ctx context.Context, params *ListAccountsPara
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
for _, grantDescrs := range grantDescrs {
|
||||
grantShorts := descr.Grant{
|
||||
Right: grantDescrs.Right,
|
||||
Pattern: grantDescrs.Pattern,
|
||||
CreatedAt: grantDescrs.CreatedAt,
|
||||
UpdatedAt: grantDescrs.UpdatedAt,
|
||||
CreatedBy: grantDescrs.CreatedBy,
|
||||
UpdatedBy: grantDescrs.UpdatedBy,
|
||||
}
|
||||
accountShort.Grants = append(accountShort.Grants, grantShorts)
|
||||
}
|
||||
accountShort.Grants = grantDescrs
|
||||
res.Accounts = append(res.Accounts, accountShort)
|
||||
}
|
||||
return res, err
|
||||
|
||||
Reference in New Issue
Block a user