Skip to content

Commit

Permalink
add paging by default to /artefacts (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
imadbourouche authored Feb 15, 2025
1 parent 989a9c3 commit 6c591f1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions controllers/artefacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ class ArtefactsController < ApplicationController
# Get all Semantic Artefacts
get do
check_last_modified_collection(LinkedData::Models::SemanticArtefact)
options = {
also_include_views: params['also_include_views'] ||= false,
includes: LinkedData::Models::SemanticArtefact.goo_attrs_to_load([])
}
artefacts = LinkedData::Models::SemanticArtefact.all_artefacts(options)
attributes, page, pagesize, _, _ = settings_params(LinkedData::Models::SemanticArtefact)
pagesize = 20 if params["pagesize"].nil?
artefacts = LinkedData::Models::SemanticArtefact.all_artefacts(attributes, page, pagesize)
reply artefacts
end

Expand Down

0 comments on commit 6c591f1

Please sign in to comment.