From b6dd495121177803e7cede96c3025cb53339032f Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 8 Dec 2018 23:13:48 -0300 Subject: [PATCH] run: register attachments bp --- litecord/blueprints/attachments.py | 3 ++- run.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/litecord/blueprints/attachments.py b/litecord/blueprints/attachments.py index 408843d..ce78ac5 100644 --- a/litecord/blueprints/attachments.py +++ b/litecord/blueprints/attachments.py @@ -21,7 +21,8 @@ from quart import Blueprint bp = Blueprint(__name__) -@bp.route('///.', +@bp.route('/attachments' + '///.', methods=['GET']) async def _get_attachment(channel_id: int, message_id: int, filename: str, ext: str): diff --git a/run.py b/run.py index addd7f6..03e1a95 100644 --- a/run.py +++ b/run.py @@ -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 }