🔧 chore(user.py): remove unnecessary line breaks and import formatting for better code readability
🔧 chore(main.py): fix indentation and remove unnecessary line breaks for better code readability 🔧 chore(login.py): fix indentation and add missing line breaks for better code readability
This commit is contained in:
parent
1c28979766
commit
3c6d46021d
3 changed files with 4 additions and 7 deletions
|
|
@ -1,10 +1,7 @@
|
|||
from datetime import datetime
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from langflow.services.database.models.base import (
|
||||
SQLModelSerializable,
|
||||
SQLModel
|
||||
)
|
||||
from langflow.services.database.models.base import SQLModelSerializable, SQLModel
|
||||
from sqlmodel import Field
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ def setup_app(
|
|||
static_files_dir = get_static_files_dir()
|
||||
|
||||
if not backend_only and (not static_files_dir or not static_files_dir.exists()):
|
||||
raise RuntimeError(
|
||||
f"Static files directory {static_files_dir} does not exist.")
|
||||
raise RuntimeError(f"Static files directory {static_files_dir} does not exist.")
|
||||
app = create_app()
|
||||
if not backend_only and static_files_dir is not None:
|
||||
setup_static_files(app, static_files_dir)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ def create_user_token(user: str) -> dict:
|
|||
access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
|
||||
access_token = create_access_token(
|
||||
# type: ignore
|
||||
data={"sub": user.username}, expires_delta=access_token_expires
|
||||
data={"sub": user.username},
|
||||
expires_delta=access_token_expires,
|
||||
)
|
||||
|
||||
return {"access_token": access_token, "token_type": "bearer"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue