dmails: fixup exceptions when verifying dmail keys.

Fix show action throwing exceptions when viewing a dmail without a dmail key.
This commit is contained in:
evazion
2020-03-14 21:09:25 -05:00
parent dc1742321d
commit 0f0e7cedf3
2 changed files with 5 additions and 1 deletions

View File

@@ -15,5 +15,9 @@ module Danbooru
def verify(*args, **options)
verifier.verify(*args, purpose: purpose, **options)
end
def verified(*args, **options)
verifier.verified(*args, purpose: purpose, **options)
end
end
end

View File

@@ -121,7 +121,7 @@ class Dmail < ApplicationRecord
end
def valid_key?(key)
id == verifier.verify(key)
id == verifier.verified(key)
end
def visible_to?(user, key)