Templayte updates and small changes

This commit is contained in:
2022-09-06 15:03:39 +02:00
parent 6530d024f8
commit b9a32e41bf
6 changed files with 387 additions and 126 deletions

View File

@@ -76,6 +76,19 @@ func (s MobilityAccountsServerImpl) GetAccount(ctx context.Context, req *GetAcco
}
return &GetAccountResponse{Account: response}, nil
}
func (s MobilityAccountsServerImpl) GetAccountUsername(ctx context.Context, req *GetAccountUsernameRequest) (*GetAccountUsernameResponse, error) {
account, err := s.handler.GetAccountUsername(req.Username, req.Namespace)
if err != nil {
fmt.Println(err)
return nil, status.Errorf(codes.AlreadyExists, "issue while retrieving account : %v", err)
}
response, err := AccountFromStorageType(account)
if err != nil {
fmt.Println(err)
return nil, status.Errorf(codes.Internal, "issue while retrieving account : %v", err)
}
return &GetAccountUsernameResponse{Account: response}, nil
}
func (s MobilityAccountsServerImpl) GetAccounts(ctx context.Context, req *GetAccountsRequest) (*GetAccountsResponse, error) {
responses, err := s.handler.GetAccounts(req.Namespaces)
if err != nil {