From 378ba67410708a01e9f26a1ae96d8c8c63df0800 Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 8 Nov 2026 12:26:25 +0100 Subject: [PATCH] Added published timestamp --- src/models.py | 4 ++-- src/routers/user.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models.py b/src/models.py index d5d69ed..47f034d 100644 --- a/src/models.py +++ b/src/models.py @@ -1,5 +1,5 @@ from pydantic import BaseModel, Field, computed_field - +from datetime import datetime class AnimeCreate(BaseModel): anilist_id: int = Field(gt=0) @@ -12,7 +12,7 @@ class AnimeEntry(BaseModel): name: str custom_name: str | None = None anilist_id: int - last_updated: str | None = None + published: datetime | None = None class Counts(BaseModel): active: int diff --git a/src/routers/user.py b/src/routers/user.py index 583e3bb..79947aa 100644 --- a/src/routers/user.py +++ b/src/routers/user.py @@ -156,7 +156,7 @@ def list_active_and_inactive_anime( name=anime_name, custom_name=custom_name, anilist_id=anilist_id, - last_updated=None if last_updated is None else last_updated, + published=last_updated, ) (anime_list.active if is_active else anime_list.inactive).append(entry) except Exception as e: