lib/geminabox/server.rb in geminabox-0.12.1 vs lib/geminabox/server.rb in geminabox-0.12.2
- old
+ new
@@ -86,14 +86,14 @@
@gems = load_gems
erb :atom, :layout => false
end
get '/api/v1/dependencies' do
- Marshal.dump(gem_list)
+ query_gems.any? ? Marshal.dump(gem_list) : 200
end
get '/api/v1/dependencies.json' do
- gem_list.to_json
+ query_gems.any? ? gem_list.to_json : {}
end
get '/upload' do
erb :upload
end