Added limit API endpoint
This commit is contained in:
8
app.py
8
app.py
@ -85,6 +85,14 @@ def transmit():
|
|||||||
# Return a success message
|
# Return a success message
|
||||||
return {'success': True}, 200
|
return {'success': True}, 200
|
||||||
|
|
||||||
|
@app.route('/limit', methods=['GET'], strict_slashes=False)
|
||||||
|
@limiter.limit("1/second")
|
||||||
|
def getLimit():
|
||||||
|
"""
|
||||||
|
Simply returns the safe limit.
|
||||||
|
"""
|
||||||
|
|
||||||
|
return {'success': True, 'limit': app.config['limit']}
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Parse console arguments
|
# Parse console arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user