Do not return unapproved screenshots
This commit is contained in:
parent
00ce29d6a5
commit
7fe26d471e
3 changed files with 5 additions and 3 deletions
|
|
@ -270,7 +270,7 @@ class PackagesController < ApplicationController
|
|||
@screenshot = @package.best_screenshot_for_version(params[:version])
|
||||
# Called as /thumbnail/:name
|
||||
else
|
||||
@screenshot = @package.screenshots.first
|
||||
@screenshot = @package.screenshots.approved.first
|
||||
end
|
||||
|
||||
# Return a 404 if the package has no screenshots or the image was not found
|
||||
|
|
@ -298,7 +298,7 @@ class PackagesController < ApplicationController
|
|||
@screenshot = @package.best_screenshot_for_version(params[:version])
|
||||
# Called as /screenshot/:name
|
||||
else
|
||||
@screenshot = @package.screenshots.first
|
||||
@screenshot = @package.screenshots.approved.first
|
||||
end
|
||||
|
||||
# Return a 404 if the package has no screenshots or the image was not found
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue