mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-18 17:14:39 -04:00
show ulid in archivebox admin
This commit is contained in:
parent
b7745ae37a
commit
5e0cc926f1
3 changed files with 23 additions and 14 deletions
|
@ -56,6 +56,7 @@ class APIToken(ABIDModel):
|
|||
return {
|
||||
"TYPE": "APIToken",
|
||||
"uuid": str(self.id),
|
||||
"ulid": str(self.ulid),
|
||||
"abid": str(self.get_abid()),
|
||||
"user_id": str(self.user.id),
|
||||
"user_username": self.user.username,
|
||||
|
@ -64,6 +65,10 @@ class APIToken(ABIDModel):
|
|||
"expires": self.expires_as_iso8601,
|
||||
}
|
||||
|
||||
@property
|
||||
def ulid(self):
|
||||
return self.get_abid().ulid
|
||||
|
||||
@property
|
||||
def expires_as_iso8601(self):
|
||||
"""Returns the expiry date of the token in ISO 8601 format or a date 100 years in the future if none."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue