mirror of https://gitlab.com/litecord/litecord.git
add base /gateway bp
This commit is contained in:
parent
6350ff688c
commit
6b066bba05
|
|
@ -0,0 +1 @@
|
|||
from .gateway import bp as gateway
|
||||
|
|
@ -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
4
run.py
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue