browser-go-api/api/api.py

15 lines
358 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())