Skip to content

Commit d2ec2cd

Browse files
authored
Merge pull request #14 from FreeClimbAPI/VCSWP-23750
Resolves VCSWP-23750
2 parents 8bc6a43 + 81ea7fa commit d2ec2cd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

main.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ def incomingSms():
3434
to = request.json['from']
3535
message_request = freeclimb.MessageRequest(_from=_from, text=message, to=to)
3636
api_instance.send_an_sms_message(message_request)
37-
return jsonify({'success':True}), 200, {'ContentType':'application/json'}
37+
return jsonify({'success':True})
3838

3939
# Specify this route with 'STATUS CALLBACK URL' in App Config
4040
@app.route('/status', methods=['POST'])
4141
def status():
42-
return jsonify({'success':True}), 200, {'ContentType':'application/json'}
42+
return jsonify({'success':True})
4343

4444

4545
def quickstart_tutorial():
@@ -54,6 +54,15 @@ def quickstart_tutorial():
5454
print("\t2. In the Dashboard or API, set your FreeClimb Application Voice Url to the dynamic endpoint NGROK generated.\n")
5555
print(api_server)
5656

57+
# Liveness probe endpoint
58+
@app.route('/live', methods=['GET'])
59+
def live():
60+
return jsonify({'status': 'live'})
61+
62+
# Readiness probe endpoint
63+
@app.route('/ready', methods=['GET'])
64+
def ready():
65+
return jsonify({'status': 'ready'})
5766

5867
if __name__ == '__main__':
5968
quickstart_tutorial()

0 commit comments

Comments
 (0)