Skip to content

Instantly share code, notes, and snippets.

@twyle
Created May 14, 2022 09:17
Show Gist options
  • Save twyle/7250a91ec6f09de81b99d9cf9048e13b to your computer and use it in GitHub Desktop.
Save twyle/7250a91ec6f09de81b99d9cf9048e13b to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""This module creates the routes for our API."""
from API import app
@app.route('/index', methods=['GET'])
@app.route('/', methods=['GET'])
def index() -> dict:
"""Handle get requests to /index route.
Returns
-------
dict:
A dictionary showing:
{
"data": 'Hello from github oauth json endpoint'
}
"""
data = {
"data": 'Hello from github oauth json endpoint'
}
return data, 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment