use message verifier purpose

This commit is contained in:
Pete Matsyburka
2024-02-19 21:13:56 +02:00
parent 6727d3be83
commit 7d154fc28d
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ ActiveSupport.on_load(:active_storage_attachment) do
has_many_attached :preview_images
def signed_uuid
@signed_uuid ||= ApplicationRecord.signed_id_verifier.generate(uuid, expires_in: 6.hours)
@signed_uuid ||= ApplicationRecord.signed_id_verifier.generate(uuid, expires_in: 6.hours, purpose: :attachment)
end
def preview_image_url
@@ -37,7 +37,7 @@ ActiveSupport.on_load(:active_storage_blob) do
end
def signed_uuid(expires_in: nil)
ApplicationRecord.signed_id_verifier.generate(uuid, expires_in:)
ApplicationRecord.signed_id_verifier.generate([uuid, 'blob'], expires_in:)
end
def delete