summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/opentox.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb
index 80339b4..3adca81 100644
--- a/lib/opentox.rb
+++ b/lib/opentox.rb
@@ -134,12 +134,11 @@ module OpenTox
# internal route not in API
# example: /SERVICE/last/0 returns last 10 modified uris (default)
# example: /SERVICE/last/5 returns last 5 modified uris
- get "/#{SERVICE}/last/:limit/?" do
- limit = params[:limit].to_i > 0 ? params[:limit].to_i : 10
- FourStore.query("SELECT DISTINCT ?g WHERE
+ get "/#{SERVICE}/ordered/?" do
+ FourStore.query("SELECT DISTINCT ?s WHERE
{GRAPH ?g
- {?s <#{RDF::DC.modified}> ?o.}
- } ORDER BY ?o LIMIT #{limit}", @accept)
+ {?s <#{RDF.type}> <#{RDF::OT}#{SERVICE.capitalize}>; <#{RDF::DC.date}> ?o. }
+ } ORDER BY ?o ", @accept)
end
# Create a new resource