Обновление приложения

This commit is contained in:
2026-04-28 22:37:19 +03:00
parent 7d00cf062e
commit 52594b5dc6
99 changed files with 5736 additions and 1052 deletions

25
backend/app/config.py Normal file
View File

@@ -0,0 +1,25 @@
from functools import lru_cache
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
DATABASE_URL: str
SECRET_KEY: str
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
DEBUG: bool = False
API_V1_PREFIX: str = "/api/v1"
ALLOWED_ORIGINS: str = "http://localhost:3000"
@property
def origins_list(self) -> list[str]:
return [o.strip() for o in self.ALLOWED_ORIGINS.split(",")]
class Config:
env_file = ".env"
@lru_cache()
def get_settings() -> Settings:
return Settings()