blueprints: fix register for attachments bp

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

View File

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

View File

@ -19,10 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
from quart import Blueprint from quart import Blueprint
bp = Blueprint(__name__) bp = Blueprint('attachments', __name__)
@bp.route('/attachments' @bp.route('/attachments'
'/<channel_id:int>/<message_id:int>/<filename:int>.<ext>', '/<int:channel_id>/<int:message_id>/<filename>.<ext>',
methods=['GET']) methods=['GET'])
async def _get_attachment(channel_id: int, message_id: int, async def _get_attachment(channel_id: int, message_id: int,
filename: str, ext: str): filename: str, ext: str):