Skip to content

Commit

Permalink
fix: add api failed due to lost comsumerId (#6256)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhuzhen authored Jan 25, 2024
1 parent 48cd745 commit e258777
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ func (s *apiService) GetApis(ctx context.Context, req *pb.GetApisRequest) (resp
func (s *apiService) CreateApi(ctx context.Context, req *pb.CreateApiRequest) (resp *pb.CreateApiResponse, err error) {
service := micro_api.Service.Clone(ctx)
reqDto := &dto.ApiReqDto{
ApiDto: dto.MakeApiDto(req.ApiRequest),
ApiReqOptionDto: &dto.ApiReqOptionDto{},
ApiDto: dto.MakeApiDto(req.ApiRequest),
ApiReqOptionDto: &dto.ApiReqOptionDto{
Policies: req.ApiRequest.Policies,
ConsumerId: req.ApiRequest.ConsumerId,
},
}
apiId, err := service.CreateApi(ctx, reqDto)
if err != nil {
Expand Down

0 comments on commit e258777

Please sign in to comment.