Spaces:
Runtime error
Runtime error
hide url
Browse files- bot_actions.py +3 -1
bot_actions.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import requests
|
2 |
import time
|
|
|
3 |
|
4 |
def save_record(arg_json):
|
5 |
-
|
|
|
6 |
print(r.status_code, r.reason)
|
7 |
return "Done"
|
8 |
|
|
|
1 |
import requests
|
2 |
import time
|
3 |
+
import os
|
4 |
|
5 |
def save_record(arg_json):
|
6 |
+
request_url = os.environ['facilityURL'] + "/facilities"
|
7 |
+
r = requests.post(request_url, json={'pk': round(time.time()), 'json': arg_json})
|
8 |
print(r.status_code, r.reason)
|
9 |
return "Done"
|
10 |
|