fix: Fixed API Token "Created On" date (#1909)

* exposed created_at on token schema

* fixed token createdAt reference

* made created_at optional for compatibility
This commit is contained in:
Michael Genson 2022-12-29 15:49:19 -06:00 committed by GitHub
parent bd2bad29a8
commit 19ae89a195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -51,7 +51,7 @@
<v-list-item-title>
{{ token.name }}
</v-list-item-title>
<v-list-item-subtitle> Created on: {{ $d(token.created_at) }} </v-list-item-subtitle>
<v-list-item-subtitle> Created on: {{ $d(new Date(token.createdAt+"Z")) }} </v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<BaseButton delete small @click="deleteToken(token.id)"></BaseButton>

View file

@ -29,6 +29,7 @@ class LongLiveTokenOut(MealieModel):
token: str
name: str
id: int
created_at: datetime | None
class Config:
orm_mode = True