Spaces:
Sleeping
Sleeping
Update google_db.py
Browse files- google_db.py +4 -2
google_db.py
CHANGED
|
@@ -11,8 +11,10 @@ async def async_save_db(data):
|
|
| 11 |
async with aiohttp.ClientSession() as session:
|
| 12 |
async with session.post(google_url, data=data, headers={'Content-Type': 'application/x-www-form-urlencoded'}) as response:
|
| 13 |
# Просто проверяем статус код, не ожидая тела ответа
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
|
| 17 |
def save_db():
|
| 18 |
err = 0
|
|
|
|
| 11 |
async with aiohttp.ClientSession() as session:
|
| 12 |
async with session.post(google_url, data=data, headers={'Content-Type': 'application/x-www-form-urlencoded'}) as response:
|
| 13 |
# Просто проверяем статус код, не ожидая тела ответа
|
| 14 |
+
if response.status == 200:
|
| 15 |
+
return True
|
| 16 |
+
else:
|
| 17 |
+
return False
|
| 18 |
|
| 19 |
def save_db():
|
| 20 |
err = 0
|