mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-15 16:32:40 -05:00
Consolidate frontend types (#1245)
This commit is contained in:
committed by
GitHub
parent
6a88a59981
commit
479900e912
@@ -1,4 +1,3 @@
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Any, Optional
|
||||
from uuid import UUID
|
||||
@@ -18,19 +17,18 @@ from ..recipe import CategoryBase
|
||||
settings = get_app_settings()
|
||||
|
||||
|
||||
class LoingLiveTokenIn(MealieModel):
|
||||
class LongLiveTokenIn(MealieModel):
|
||||
name: str
|
||||
|
||||
|
||||
class LongLiveTokenOut(LoingLiveTokenIn):
|
||||
id: int
|
||||
created_at: datetime
|
||||
class LongLiveTokenOut(MealieModel):
|
||||
token: str
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class CreateToken(LoingLiveTokenIn):
|
||||
class CreateToken(LongLiveTokenIn):
|
||||
user_id: UUID4
|
||||
token: str
|
||||
|
||||
@@ -38,6 +36,13 @@ class CreateToken(LoingLiveTokenIn):
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class DeleteTokenResponse(MealieModel):
|
||||
token_delete: str
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class ChangePassword(MealieModel):
|
||||
current_password: str
|
||||
new_password: str
|
||||
|
||||
Reference in New Issue
Block a user