diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-09-13 10:59:36 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-09-13 10:59:36 +0200 |
commit | 0acc756e0f2db27abeacf9e229a910df315d279d (patch) | |
tree | 1a31aa3fc5e844f4f0ffc6cd5cd9a8f4516b667e /reach_reports/reach_application.rb | |
parent | f7464e766afebd71397c0f7ad9252f77e13f6c3a (diff) |
remove task when creatign report from xml
Diffstat (limited to 'reach_reports/reach_application.rb')
-rw-r--r-- | reach_reports/reach_application.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/reach_reports/reach_application.rb b/reach_reports/reach_application.rb index 6d60d21..4afaf51 100644 --- a/reach_reports/reach_application.rb +++ b/reach_reports/reach_application.rb @@ -29,13 +29,15 @@ post '/reach_report/:type' do type = extract_type(params) content_type "text/uri-list" - task_uri = OpenTox::Task.as_task( "Create "+type+" report", url_for("/reach_report/"+type, :full), params ) do - LOGGER.info "creating "+type+" report "+params.inspect - ReachReports.create_report(type,params,request.env["rack.input"]) - end - halt 202,task_uri + LOGGER.info "creating "+type+" report "+params.inspect + result_uri = ReachReports.create_report(type,params,request.env["rack.input"]) + if OpenTox::Utils.task_uri?(result_uri) + halt 202,result_uri + else + result_uri + end end get '/reach_report/:type/:id' do |