Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -42,15 +42,15 @@ async def create_list_from_template(request: Request):
|
|
| 42 |
# Step 2: Fetch the list details
|
| 43 |
get_url = f"https://api.clickup.com/api/v2/list/{list_id}"
|
| 44 |
get_response = requests.get(get_url, headers=headers)
|
| 45 |
-
|
| 46 |
if get_response.status_code == 200:
|
| 47 |
list_data = get_response.json()
|
| 48 |
-
|
| 49 |
-
list_url = f"https://app.clickup.com/{team_id}/v/l/li/{list_id}"
|
| 50 |
return {
|
| 51 |
"message": "✅ Video contractor list created successfully.",
|
| 52 |
"list_url": list_url
|
| 53 |
}
|
|
|
|
| 54 |
else:
|
| 55 |
return {
|
| 56 |
"message": "⚠️ List created but failed to fetch list info.",
|
|
|
|
| 42 |
# Step 2: Fetch the list details
|
| 43 |
get_url = f"https://api.clickup.com/api/v2/list/{list_id}"
|
| 44 |
get_response = requests.get(get_url, headers=headers)
|
| 45 |
+
|
| 46 |
if get_response.status_code == 200:
|
| 47 |
list_data = get_response.json()
|
| 48 |
+
list_url = list_data.get("url") # ✅ Use built-in full URL
|
|
|
|
| 49 |
return {
|
| 50 |
"message": "✅ Video contractor list created successfully.",
|
| 51 |
"list_url": list_url
|
| 52 |
}
|
| 53 |
+
|
| 54 |
else:
|
| 55 |
return {
|
| 56 |
"message": "⚠️ List created but failed to fetch list info.",
|