fix: date
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
from pydantic import BaseModel
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class TinyURL(BaseModel):
|
class TinyURL(BaseModel):
|
||||||
@@ -6,4 +8,4 @@ class TinyURL(BaseModel):
|
|||||||
url: str
|
url: str
|
||||||
endless: bool
|
endless: bool
|
||||||
wallet: str
|
wallet: str
|
||||||
time: float
|
time: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
|
||||||
|
|||||||
Reference in New Issue
Block a user