diff --git a/app/controllers/json_controller.rb b/app/controllers/json_controller.rb index 66251b3..9db5d5e 100644 --- a/app/controllers/json_controller.rb +++ b/app/controllers/json_controller.rb @@ -16,5 +16,6 @@ class JsonController < ApplicationController # JSON list of packages that do not have screenshots def packages_without_screenshots + @p = Package.without_screenshots.all end end diff --git a/config/routes.rb b/config/routes.rb index 9c73bd8..37b9499 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -38,6 +38,7 @@ Debshots::Application.routes.draw do get 'json/package/:name' => 'json#package', as: :json_package, defaults: { format: :json } get 'json/packages' => 'json#packages', as: :json_packages, defaults: { format: :json } get 'json/screenshots' => 'json#screenshots', as: :json_screenshots, defaults: { format: :json } + get 'json/packages-without-screenshots' => 'json#packages_without_screenshots', defaults: { format: :json } # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes".