From 59d8ff5cb5db3d059c801e44ce9bc26b9168f7f2 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Thu, 8 Sep 2016 11:57:13 +0200 Subject: add initial reporting on QMRF , change route --- api/api.json | 4 ++-- lib/report.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/api.json b/api/api.json index 550c547..4deb8f3 100644 --- a/api/api.json +++ b/api/api.json @@ -143,7 +143,7 @@ } } }, - "/model/report": { + "/report": { "get": { "tags": [ "report" @@ -185,7 +185,7 @@ } } }, - "/model/report/{id}": { + "/report/{id}": { "get": { "tags": [ "report" diff --git a/lib/report.rb b/lib/report.rb index c8b8165..695365d 100644 --- a/lib/report.rb +++ b/lib/report.rb @@ -1,7 +1,7 @@ # Get a list of all possible reports to prediction models # @param [Header] Accept one of text/uri-list, # @return [text/uri-list] list of all prediction models -get "/model/report/?" do +get "/report/?" do models = Model::Prediction.all case @accept when "text/uri-list" @@ -23,7 +23,7 @@ get "/model/report/?" do end end -get "/model/report/:id/?" do +get "/report/:id/?" do model = Model::Lazar.find params[:id] resource_not_found_error "Model with id: #{params[:id]} not found." unless model prediction_model = Model::Prediction.find_by :model_id => params[:id] -- cgit v1.2.3