1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-01-31 02:53:36 +00:00
mipilin/views/_util.pug
roxwize 961d963677
Some iprovements idfk
Signed-off-by: roxwize <rae@roxwize.xyz>
2025-01-27 23:34:46 -05:00

8 lines
230 B
Text

mixin invite_code_expiration(code)
- const timestamp = code.expires.getTime()
if timestamp === 0
td.subtle never
else if Date.now() >= timestamp
td.error EXPIRED
else
td= code.expiresString