run: register attachments bp

This commit is contained in:
Luna 2018-12-08 23:13:48 -03:00
parent 9ec8577b7f
commit b6dd495121
2 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,8 @@ from quart import Blueprint
bp = Blueprint(__name__)
@bp.route('/<channel_id:int>/<message_id:int>/<filename:int>.<ext>',
@bp.route('/attachments'
'/<channel_id:int>/<message_id:int>/<filename:int>.<ext>',
methods=['GET'])
async def _get_attachment(channel_id: int, message_id: int,
filename: str, ext: str):

4
run.py
View File

@ -34,7 +34,8 @@ import config
from litecord.blueprints import (
gateway, auth, users, guilds, channels, webhooks, science,
voice, invites, relationships, dms, icons, nodeinfo, static
voice, invites, relationships, dms, icons, nodeinfo, static,
attachments
)
# those blueprints are separated from the "main" ones
@ -131,6 +132,7 @@ def set_blueprints(app_):
fake_store: None,
icons: -1,
attachments: -1,
nodeinfo: -1,
static: -1
}