mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-03-05 21:23:10 -05:00
chore: refactor base schema (#1098)
* remove dead backup code * implmenet own base model * refactor to use MealieModel instead of CamelModel * cleanup deps
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from fastapi_camelcase import CamelModel
|
||||
from pydantic import UUID4, Field
|
||||
|
||||
from mealie.schema._mealie import MealieModel
|
||||
|
||||
from .recipe import Recipe
|
||||
|
||||
|
||||
@@ -10,7 +11,7 @@ def defaut_expires_at_time() -> datetime:
|
||||
return datetime.utcnow() + timedelta(days=30)
|
||||
|
||||
|
||||
class RecipeShareTokenCreate(CamelModel):
|
||||
class RecipeShareTokenCreate(MealieModel):
|
||||
recipe_id: UUID4
|
||||
expires_at: datetime = Field(default_factory=defaut_expires_at_time)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user