Feature: Made the title configurable

This commit is contained in:
2023-08-23 11:38:59 +05:30
parent b1ca758e9d
commit 56da6b0a82
14 changed files with 66 additions and 4 deletions

View File

@ -7,6 +7,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
# openssl rand -hex 32
TITLE: str = ""
SECRET_KEY: str = secrets.token_urlsafe(32)
MIDDLEWARE_SECRET_KEY: str = secrets.token_urlsafe(5)
ALGORITHM: str = "HS256"

View File

@ -40,6 +40,7 @@ from .routers import (
recipe,
recipe_template,
role,
title,
user,
voucher,
voucher_types,
@ -130,6 +131,7 @@ app.include_router(maintenance.router, prefix="/api/maintenance", tags=["setting
app.include_router(db_integrity.router, prefix="/api/db-integrity", tags=["management"])
app.include_router(rebase.router, prefix="/api/rebase", tags=["management"])
app.include_router(title.router, prefix="/api/title")
def init() -> None:

View File

@ -0,0 +1,11 @@
from fastapi import APIRouter
from ..core.config import settings
router = APIRouter()
@router.get("", response_model=str)
async def get_version() -> str:
return settings.TITLE