added new db method GetAllYclientsAccounts
This commit is contained in:
parent
6a3f41120c
commit
dcbc77ca4f
@ -46,14 +46,14 @@ func (r *YclientsRepository) GetCurrentAccount(ctx context.Context, accountID st
|
|||||||
return &user, nil
|
return &user, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *YclientsRepository) GetAllYclientsAccounts(ctx context.Context) ([]*model.YclientsAccount, error) {
|
func (r *YclientsRepository) GetAllYclientsAccounts(ctx context.Context) ([]model.YclientsAccount, error) {
|
||||||
rows, err := r.queries.GetAllYclientsAccounts(ctx)
|
rows, err := r.queries.GetAllYclientsAccounts(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var result []*model.YclientsAccount
|
var result []model.YclientsAccount
|
||||||
for _, row := range rows {
|
for _, row := range rows {
|
||||||
result = append(result, &model.YclientsAccount{
|
result = append(result, model.YclientsAccount{
|
||||||
ID: row.ID,
|
ID: row.ID,
|
||||||
AccountID: row.Accountid,
|
AccountID: row.Accountid,
|
||||||
SalonID: row.Salonid,
|
SalonID: row.Salonid,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user