Implement config router
This commit is contained in:
@ -2,3 +2,4 @@ from . import basic
|
||||
from . import api
|
||||
from . import user
|
||||
from . import login
|
||||
from . import config
|
||||
|
||||
1
core/scripts/webpanel/routers/config/__init__.py
Normal file
1
core/scripts/webpanel/routers/config/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .config import router
|
||||
10
core/scripts/webpanel/routers/config/config.py
Normal file
10
core/scripts/webpanel/routers/config/config.py
Normal file
@ -0,0 +1,10 @@
|
||||
from fastapi import APIRouter, Depends, Request
|
||||
from fastapi.templating import Jinja2Templates
|
||||
from dependency import get_templates
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get('/')
|
||||
async def config(request: Request, templates: Jinja2Templates = Depends(get_templates)):
|
||||
return templates.TemplateResponse('config.html', {'request': request})
|
||||
Reference in New Issue
Block a user