Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,9 @@ WHATSAPP_URL = "https://7105.api.greenapi.com/waInstance7105210836/sendMessage/8
|
|
| 18 |
# Your access token
|
| 19 |
ACCESS_TOKEN = "2144425825_36f2249dc27c5aca075ac5442b1bbcdf01c3a29b9e41b86bda46a6cf651acd0f"
|
| 20 |
|
|
|
|
|
|
|
|
|
|
| 21 |
# Headers for ClickUp authorization
|
| 22 |
headers = {
|
| 23 |
"Authorization": ACCESS_TOKEN,
|
|
@@ -74,8 +77,6 @@ async def create_task(request: Request):
|
|
| 74 |
print(f"Start Date: {start_date}")
|
| 75 |
print(f"End Date: {end_date}")
|
| 76 |
|
| 77 |
-
|
| 78 |
-
web_app_url = "https://script.google.com/macros/s/AKfycbxAF_YXKonRWoPo7MurkeC3UbUqZyNsPT85SE9AukuJAaG6mTzwtn7N-PVo4j-Qv2LP/exec"
|
| 79 |
params = {
|
| 80 |
"mode": "extended",
|
| 81 |
"taskType": task_type,
|
|
@@ -293,7 +294,7 @@ async def task_update(request: Request):
|
|
| 293 |
space_id = task_details.get("space", {}).get("id")
|
| 294 |
|
| 295 |
# Step 2: Prepare the request to Apps Script Web App
|
| 296 |
-
|
| 297 |
params = {
|
| 298 |
"mode": "notify",
|
| 299 |
"spaceId": space_id,
|
|
@@ -303,7 +304,7 @@ async def task_update(request: Request):
|
|
| 303 |
params.setdefault("assignees", []).append(assignee_id)
|
| 304 |
|
| 305 |
# Step 3: Make the request
|
| 306 |
-
response = requests.get(
|
| 307 |
|
| 308 |
# Step 4: Handle the response
|
| 309 |
if response.ok:
|
|
|
|
| 18 |
# Your access token
|
| 19 |
ACCESS_TOKEN = "2144425825_36f2249dc27c5aca075ac5442b1bbcdf01c3a29b9e41b86bda46a6cf651acd0f"
|
| 20 |
|
| 21 |
+
# Google Apps Script Data handler
|
| 22 |
+
web_app_url = "https://script.google.com/macros/s/AKfycbw7MQjAlhkrK7d4vHiOGPmo6NufSRwz0u_oTa1xk-lEs7JmQ56QqamhQ28jA8BRq5X0/exec"
|
| 23 |
+
|
| 24 |
# Headers for ClickUp authorization
|
| 25 |
headers = {
|
| 26 |
"Authorization": ACCESS_TOKEN,
|
|
|
|
| 77 |
print(f"Start Date: {start_date}")
|
| 78 |
print(f"End Date: {end_date}")
|
| 79 |
|
|
|
|
|
|
|
| 80 |
params = {
|
| 81 |
"mode": "extended",
|
| 82 |
"taskType": task_type,
|
|
|
|
| 294 |
space_id = task_details.get("space", {}).get("id")
|
| 295 |
|
| 296 |
# Step 2: Prepare the request to Apps Script Web App
|
| 297 |
+
|
| 298 |
params = {
|
| 299 |
"mode": "notify",
|
| 300 |
"spaceId": space_id,
|
|
|
|
| 304 |
params.setdefault("assignees", []).append(assignee_id)
|
| 305 |
|
| 306 |
# Step 3: Make the request
|
| 307 |
+
response = requests.get(web_app_url, params=params)
|
| 308 |
|
| 309 |
# Step 4: Handle the response
|
| 310 |
if response.ok:
|