mirror of
https://github.com/Starlio-app/Starlio-web.git
synced 2024-12-25 01:43:44 +03:00
fix pep8
This commit is contained in:
parent
2f0e43a994
commit
120c84418b
3 changed files with 5 additions and 2 deletions
1
main.py
1
main.py
|
@ -18,6 +18,7 @@ app.mount('/.well-known/', StaticFiles(directory='./.well-known/'))
|
|||
async def app_ads(req, __):
|
||||
return FileResponse('./app-ads.txt')
|
||||
|
||||
|
||||
@app.exception_handler(404)
|
||||
async def not_found(req, __):
|
||||
return FileResponse('./src/web/html/error/404.html')
|
|
@ -3,6 +3,7 @@ from fastapi.responses import FileResponse
|
|||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get('/')
|
||||
async def main():
|
||||
return FileResponse('./src/web/html/index.html')
|
||||
return FileResponse('./src/web/html/index.html')
|
||||
|
|
|
@ -8,6 +8,7 @@ router = APIRouter()
|
|||
|
||||
template = Jinja2Templates(directory='./src/web/html')
|
||||
|
||||
|
||||
@router.get('/wallpaper/{day}', response_class=HTMLResponse)
|
||||
async def wallpaper(request: Request, day):
|
||||
token = '1gI9G84ZafKDEnrbydviGknReOGiVK9jqrQBE3et'
|
||||
|
@ -20,4 +21,4 @@ async def wallpaper(request: Request, day):
|
|||
request,
|
||||
'/wallpaper.html',
|
||||
{'info': res.json()}
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue