fix: handle possible nil pointer of query (#1407)

This commit is contained in:
Livio Amstutz
2021-03-11 09:40:40 +01:00
committed by GitHub
parent 5cfb6ca0e9
commit af55c4a65c
19 changed files with 122 additions and 72 deletions

View File

@@ -41,7 +41,8 @@ func (s *Server) ListApps(ctx context.Context, req *mgmt_pb.ListAppsRequest) (*m
}
func (s *Server) ListAppChanges(ctx context.Context, req *mgmt_pb.ListAppChangesRequest) (*mgmt_pb.ListAppChangesResponse, error) {
res, err := s.project.ApplicationChanges(ctx, req.ProjectId, req.AppId, req.Query.Offset, uint64(req.Query.Limit), req.Query.Asc)
offset, limit, asc := object_grpc.ListQueryToModel(req.Query)
res, err := s.project.ApplicationChanges(ctx, req.ProjectId, req.AppId, offset, limit, asc)
if err != nil {
return nil, err
}