browser-go-api/api/api.py

18 lines
434 B
Python
Raw Normal View History

2019-10-04 22:00:47 +00:00
from flask import Blueprint, request, jsonify, session
from .users.user_endpoint import UserEndpoint
api = Blueprint('api', __name__, url_prefix='/api')
@api.route('/home', methods=['GET'])
def api_home():
response = {"message": "home page"}
return jsonify(response)
@api.route('/users')
def api_users():
return jsonify(UserEndpoint.users())
2019-10-07 05:51:36 +00:00
@api.route('/user')
def api_user():
2019-10-07 20:55:43 +00:00
return jsonify(UserEndpoint.user())