add static bp

This commit is contained in:
S Stewart 2018-11-18 19:58:06 -06:00
parent b18188cdeb
commit ef2a1480ed
2 changed files with 11 additions and 2 deletions

View File

@ -11,7 +11,7 @@ from .relationships import bp as relationships
from .dms import bp as dms
from .icons import bp as icons
from .nodeinfo import bp as nodeinfo
from .static import bp as static
__all__ = ['gateway', 'auth', 'users', 'guilds', 'channels',
'webhooks', 'science', 'voice', 'invites', 'relationships',
'dms', 'icons', 'nodeinfo']
'dms', 'icons', 'nodeinfo', 'static']

View File

@ -0,0 +1,9 @@
from quart import Blueprint, current_app as app
from pathlib import Path
bp = Blueprint('static', __name__)
@bp.route('/<path:path>')
async def static_pages(path):
return app.send_static_file(str(Path(f'./static/{path}')))