add health check endpoint
This commit is contained in:
parent
4a2450e28f
commit
3d8c809e64
|
@ -5,6 +5,14 @@ from model import Account
|
||||||
import libforget.settings
|
import libforget.settings
|
||||||
import libforget.json
|
import libforget.json
|
||||||
|
|
||||||
|
@app.route('/api/health_check')
|
||||||
|
def health_check():
|
||||||
|
try:
|
||||||
|
db.session.execute('SELECT 1')
|
||||||
|
return 'ok'
|
||||||
|
except Exception:
|
||||||
|
return ('bad', 500)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/settings', methods=('PUT',))
|
@app.route('/api/settings', methods=('PUT',))
|
||||||
@require_auth_api
|
@require_auth_api
|
||||||
|
|
Loading…
Reference in New Issue