Add beneficiaries informations to bookings list
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 1m25s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 1m25s
This commit is contained in:
@@ -42,6 +42,22 @@ func (s *ServicesHandler) GetBeneficiaries() (accounts []storage.Account, err er
|
||||
return
|
||||
}
|
||||
|
||||
func (s *ServicesHandler) GetBeneficiariesMap() (accounts map[string]storage.Account, err error) {
|
||||
accounts = map[string]storage.Account{}
|
||||
request := &mobilityaccounts.GetAccountsRequest{
|
||||
Namespaces: []string{"parcoursmob_beneficiaries"},
|
||||
}
|
||||
resp, err := s.GRPC.MobilityAccounts.GetAccounts(context.TODO(), request)
|
||||
|
||||
if err == nil {
|
||||
for _, v := range resp.Accounts {
|
||||
accounts[v.Id] = v.ToStorageType()
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s *ServicesHandler) GetAccounts() (accounts []storage.Account, err error) {
|
||||
accounts = []storage.Account{}
|
||||
request := &mobilityaccounts.GetAccountsRequest{
|
||||
|
||||
Reference in New Issue
Block a user