Fix missing expiration after refacto

This commit is contained in:
Mathieu Magnin 2024-09-17 14:21:54 +02:00
parent c902061ebf
commit 8384be12a0
No known key found for this signature in database
GPG key ID: 8DCAFC82D7BA654E

View file

@ -10,6 +10,7 @@ class JwtField < Administrate::Field::Base
return "Token présent, sans expiration" unless decoded_token[0].key?('exp')
expiration = Time.zone.at(decoded_token[0]['exp'])
if expiration < Time.zone.now
"Token présent, expiré le #{expiration.strftime('%d/%m/%Y à %H:%M')}"
else