Skip to content

Commit

Permalink
Merge pull request #78 from ontoportal-lirmm/pl/fix-get-submission-me…
Browse files Browse the repository at this point in the history
…trics

Fix get a submission metrics
  • Loading branch information
mdorf authored Sep 6, 2023
2 parents 895d3bf + faa3a99 commit 71e15ff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions controllers/metrics_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class MetricsController < ApplicationController
get "/ontologies/:ontology/metrics" do
check_last_modified_collection(LinkedData::Models::Metric)
ont, sub = get_ontology_and_submission
ont = Ontology.find(params["ontology"]).first
error 404, "Ontology #{params['ontology']} not found" unless ont
sub.bring(ontology: [:acronym], metrics: LinkedData::Models::Metric.goo_attrs_to_load(includes_param))
reply sub.metrics || {}
Expand All @@ -106,10 +105,9 @@ class MetricsController < ApplicationController
# reply {}
end

get "/ontologies/:ontology/submissions/:submissionId/metrics" do
get "/ontologies/:ontology/submissions/:ontology_submission_id/metrics" do
check_last_modified_collection(LinkedData::Models::Metric)
ont, sub = get_ontology_and_submission
ont = Ontology.find(params["ontology"]).first
error 404, "Ontology #{params['ontology']} not found" unless ont
sub.bring(ontology: [:acronym], metrics: LinkedData::Models::Metric.goo_attrs_to_load(includes_param))
reply sub.metrics || {}
Expand Down

0 comments on commit 71e15ff

Please sign in to comment.