Skip to content

Commit 530bf6a

Browse files
authored
Merge pull request #71 from TheMeier/puppet_533_compat
use nil instead of false for pagination: next
2 parents 48b8c42 + e1d8250 commit 530bf6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/puppet_forge_server/app/version3.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def initialize(backends)
5151
halt 400, json({:error => 'The number of version constraints in the query does not match the number of module names'}) unless params[:module]
5252
author, name = params[:module].split '-'
5353
releases = releases(author, name)
54-
halt 200, json({:pagination => {:next => false}, :results => []}) unless releases
55-
json :pagination => {:next => false, :total => releases.count}, :results => releases
54+
halt 200, json({:pagination => {:next => nil}, :results => []}) unless releases
55+
json :pagination => {:next => nil, :total => releases.count}, :results => releases
5656
end
5757

5858
get '/v3/files/*' do
@@ -86,8 +86,8 @@ def initialize(backends)
8686
backend.query_metadata(query)
8787
end.flatten.compact.uniq
8888
modules = metadata.empty? ? nil : get_modules(metadata)
89-
halt 200, json({:pagination => {:next => false}, :results => []}) unless modules
90-
json :pagination => {:next => false, :total => modules.count}, :results => modules
89+
halt 200, json({:pagination => {:next => nil}, :results => []}) unless modules
90+
json :pagination => {:next => nil, :total => modules.count}, :results => modules
9191
end
9292

9393
get '/v3/users/:author' do

0 commit comments

Comments
 (0)