Added limit API endpoint

This commit is contained in:
2026-06-03 18:59:09 +01:00
parent 10520db877
commit 6231059b82

8
app.py
View File

@ -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