PEP8 + добавления роута robots.txt

This commit is contained in:
Данил 2024-09-25 14:30:40 +03:00
parent 0ee52a2e70
commit f45303dc2d

View file

@ -19,6 +19,11 @@ async def app_ads(req, __):
return FileResponse('./app-ads.txt') return FileResponse('./app-ads.txt')
@app.route('/robots.txt')
async def robots_txt(req, __):
return FileResponse('./robots.txt')
@app.exception_handler(404) @app.exception_handler(404)
async def not_found(req, __): async def not_found(req, __):
return FileResponse('./src/web/html/error/404.html') return FileResponse('./src/web/html/error/404.html')