aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/packages_controller.rb')
-rw-r--r--app/controllers/packages_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/packages_controller.rb b/app/controllers/packages_controller.rb
index 9580752..80a9448 100644
--- a/app/controllers/packages_controller.rb
+++ b/app/controllers/packages_controller.rb
@@ -25,7 +25,7 @@ class PackagesController < ApplicationController
@package = PackageRepository.find_by(:atom, params[:id])
fail ActionController::RoutingError, 'No such package' unless @package
- fresh_when etag: Time.parse(@package.updated_at), last_modified: Time.parse(@package.updated_at), public: true
+ fresh_when etag: @package.updated_at, last_modified: @package.updated_at, public: true
# Enable this in 2024 (when we have full-color emojis on a Linux desktop)
# @title = ' &#x1F4E6; %s' % @package.atom
@@ -37,7 +37,7 @@ class PackagesController < ApplicationController
@package = PackageRepository.find_by(:atom, params[:id])
fail ActionController::RoutingError, 'No such package' unless @package
- if stale?(etag: Time.parse(@package.updated_at), last_modified: Time.parse(@package.updated_at), public: true)
+ if stale?(etag: @package.updated_at, last_modified: @package.updated_at, public: true)
@changelog = Rails.cache.fetch("changelog/#{@package.atom}") do
CommitRepository.find_sorted_by('packages', @package.category + '/'+ @package.name, "date", "desc", 5)
end