diff --git a/app/controllers/packages_controller.rb b/app/controllers/packages_controller.rb index 690e635..00215ee 100644 --- a/app/controllers/packages_controller.rb +++ b/app/controllers/packages_controller.rb @@ -64,6 +64,13 @@ class PackagesController < ApplicationController end end + def approve_screenshot + @screenshot = Screenshot.find(params[:id]) + @screenshot.approve_screenshot! + flash['notice'] = "Screenshot approved." + redirect_to :back + end + # Returns a 160x120 thumbnail image if posssible. # If the package is not found it returns a dummy image along with status 404. # If the package is found but has no screenshots then it also returns a