add base /gateway bp

This commit is contained in:
slice 2018-06-16 17:00:11 -07:00
parent 6350ff688c
commit 6b066bba05
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
3 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1 @@
from .gateway import bp as gateway

View File

@ -0,0 +1,10 @@
from quart import Blueprint, jsonify
bp = Blueprint('gateway', __name__)
@bp.route('/gateway')
def api_gateway():
return jsonify({"url": "..."})
# TODO: /gateway/bot (requires token)

4
run.py
View File

@ -1,9 +1,10 @@
import logging
import asyncpg
from quart import Quart, g
from quart import Quart, g, Blueprint
import config
from litecord.blueprints import gateway
logging.basicConfig(level=logging.INFO)
log = logging.getLogger(__name__)
@ -16,6 +17,7 @@ def make_app():
app = make_app()
app.register_blueprint(gateway, url_prefix='/api/v6')
@app.before_serving