mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-06 07:53:11 -05:00
Refactor/recipe routes (#370)
* format with black * black format * flake8 * remove bar exceptions * remove test for depreciated route * recipe settings editr * add sqlite Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -120,7 +120,7 @@ class AppSettings(BaseSettings):
|
||||
DEFAULT_EMAIL: str = "changeme@email.com"
|
||||
DEFAULT_PASSWORD: str = "MyPassword"
|
||||
|
||||
TOKEN_TIME: int = 2 # Time in Hours
|
||||
TOKEN_TIME: int = 2 # Time in Hours
|
||||
|
||||
# Not Used!
|
||||
SFTP_USERNAME: Optional[str]
|
||||
|
||||
@@ -14,7 +14,7 @@ ALGORITHM = "HS256"
|
||||
def create_access_token(data: dict(), expires_delta: timedelta = None) -> str:
|
||||
to_encode = data.copy()
|
||||
expires_delta = expires_delta or timedelta(hours=settings.TOKEN_TIME)
|
||||
|
||||
|
||||
expire = datetime.utcnow() + expires_delta
|
||||
|
||||
to_encode.update({"exp": expire})
|
||||
|
||||
Reference in New Issue
Block a user