Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,9 +6,9 @@ import os
|
|
| 6 |
API_URL = "https://host.palple.polrambora.com/pmsq"
|
| 7 |
API_TOKEN = os.getenv("POLLY")
|
| 8 |
|
| 9 |
-
|
| 10 |
-
"
|
| 11 |
-
"
|
| 12 |
}
|
| 13 |
|
| 14 |
ASSISTANT_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/main/API.png"
|
|
@@ -20,9 +20,10 @@ def authorize(api_key):
|
|
| 20 |
"Authorization": f"{API_TOKEN}",
|
| 21 |
"Content-Type": "application/json",
|
| 22 |
}
|
|
|
|
| 23 |
response = requests.post("https://polrambora.com/api/v2/checkSDPA", headers=test_headers, data=json.dumps(test_data))
|
| 24 |
if response.status_code == 200:
|
| 25 |
-
|
| 26 |
return True
|
| 27 |
else:
|
| 28 |
return False
|
|
|
|
| 6 |
API_URL = "https://host.palple.polrambora.com/pmsq"
|
| 7 |
API_TOKEN = os.getenv("POLLY")
|
| 8 |
|
| 9 |
+
body = {
|
| 10 |
+
"kind": "PER_DATA",
|
| 11 |
+
"identificator": "",
|
| 12 |
}
|
| 13 |
|
| 14 |
ASSISTANT_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/main/API.png"
|
|
|
|
| 20 |
"Authorization": f"{API_TOKEN}",
|
| 21 |
"Content-Type": "application/json",
|
| 22 |
}
|
| 23 |
+
print("hello")
|
| 24 |
response = requests.post("https://polrambora.com/api/v2/checkSDPA", headers=test_headers, data=json.dumps(test_data))
|
| 25 |
if response.status_code == 200:
|
| 26 |
+
body["identificator"] = f"{api_key}"
|
| 27 |
return True
|
| 28 |
else:
|
| 29 |
return False
|