Files
payments/internal/api/services/accounts_get.go

17 lines
340 B
Go

package services
import (
"context"
"github.com/formancehq/payments/internal/models"
)
func (s *Service) AccountsGet(ctx context.Context, id models.AccountID) (*models.Account, error) {
account, err := s.storage.AccountsGet(ctx, id)
if err != nil {
return nil, newStorageError(err, "cannot get account")
}
return account, nil
}