fix: some backend bugs (#1438)

* fix: fix setup

* fix oidc app change

* fix: fix migration and proto

* fix: fix granted projects

* setup1 apis instead of apps

* fix: add object detail with creation date

* fix user phone change

* add localizer to AddOIDCAppResponse

* fix test

* fix domain test

* fix: converter

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-03-19 18:46:26 +01:00
committed by GitHub
parent 24527bd354
commit 6b1f7ba333
58 changed files with 578 additions and 429 deletions

View File

@@ -26,12 +26,12 @@ func (s *Server) GetMyPhone(ctx context.Context, _ *auth_pb.GetMyPhoneRequest) (
}
func (s *Server) SetMyPhone(ctx context.Context, req *auth_pb.SetMyPhoneRequest) (*auth_pb.SetMyPhoneResponse, error) {
phone, err := s.command.ChangeHumanPhone(ctx, UpdateMyPhoneToDomain(ctx, req))
phone, err := s.command.ChangeHumanPhone(ctx, UpdateMyPhoneToDomain(ctx, req), authz.GetCtxData(ctx).ResourceOwner)
if err != nil {
return nil, err
}
return &auth_pb.SetMyPhoneResponse{
Details: object.ToDetailsPb(
Details: object.ChangeToDetailsPb(
phone.Sequence,
phone.ChangeDate,
phone.ResourceOwner,
@@ -48,7 +48,7 @@ func (s *Server) VerifyMyPhone(ctx context.Context, req *auth_pb.VerifyMyPhoneRe
//TODO: response from business
return &auth_pb.VerifyMyPhoneResponse{
//Details: object.DomainToDetailsPb(objectDetails),
//Details: object.DomainToChangeDetailsPb(objectDetails),
}, nil
}
@@ -59,7 +59,7 @@ func (s *Server) ResendMyPhoneVerification(ctx context.Context, _ *auth_pb.Resen
return nil, err
}
return &auth_pb.ResendMyPhoneVerificationResponse{
Details: object.DomainToDetailsPb(objectDetails),
Details: object.DomainToChangeDetailsPb(objectDetails),
}, nil
}
@@ -70,6 +70,6 @@ func (s *Server) RemoveMyPhone(ctx context.Context, _ *auth_pb.RemoveMyPhoneRequ
return nil, err
}
return &auth_pb.RemoveMyPhoneResponse{
Details: object.DomainToDetailsPb(objectDetails),
Details: object.DomainToChangeDetailsPb(objectDetails),
}, nil
}