browser-go-api/api/api.py

24 lines
606 B
Python
Raw Normal View History

2019-10-04 22:00:47 +00:00
from flask import Blueprint, request, jsonify, session
2019-10-09 00:18:40 +00:00
from .users.api_users import api_users
from .rooms.api_rooms import api_rooms
2019-10-10 21:57:29 +00:00
from .games.api_games import api_games
2019-10-04 22:00:47 +00:00
2019-10-09 07:08:37 +00:00
from auth.auth import auth
2019-10-04 22:00:47 +00:00
api = Blueprint('api', __name__, url_prefix='/api')
2019-10-09 00:18:40 +00:00
def register_api_endpoints(app):
app.register_blueprint(api_users)
app.register_blueprint(api_rooms)
2019-10-10 21:57:29 +00:00
app.register_blueprint(api_games)
2019-10-09 00:18:40 +00:00
app.register_blueprint(api)
2019-10-09 07:08:37 +00:00
app.register_blueprint(auth)
2019-10-09 00:18:40 +00:00
return app
2019-10-04 22:00:47 +00:00
@api.route('/home', methods=['GET'])
def api_home():
response = {"message": "home page"}
return jsonify(response)
2019-10-08 23:56:28 +00:00