Last active
May 13, 2022 07:29
-
-
Save twyle/ab256e8baf6afa249f700bbae0282edf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""This module creates the routes for our API.""" | |
from API import app | |
@app.route('/api/v1', methods=['GET']) | |
@app.route('/', methods=['GET']) | |
def api_home() -> dict: | |
"""Handle get requests to /api/v1 route. | |
Returns | |
------- | |
dict: | |
A dictionary showing: | |
{ | |
'data': 'Hello from shileds.io json endpoint' | |
} | |
""" | |
data = { | |
'data': 'Hello from shileds.io json endpoint' | |
} | |
return data, 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment