Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -218,21 +218,11 @@ async def update_streams(request: Request):
|
|
| 218 |
# Read the request body as JSON
|
| 219 |
payload = await request.json()
|
| 220 |
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
user_id = payload.get('userId')
|
| 224 |
-
activity_message = payload.get('activityMessage')
|
| 225 |
|
| 226 |
# Accessing nested data in the 'event' object
|
| 227 |
-
|
| 228 |
-
old_data = payload['event']['data']['old']
|
| 229 |
-
new_data = payload['event']['data']['new']
|
| 230 |
-
|
| 231 |
-
# Example of using the extracted data
|
| 232 |
-
print(f"Event Name: {event_name}")
|
| 233 |
-
print(f"Old Stream Name: {old_data['name']}")
|
| 234 |
-
print(f"New Stream Description: {new_data['description']}")
|
| 235 |
-
print("trying to print request msg")
|
| 236 |
speckle_token = os.environ.get("SPECKLE_TOKEN")
|
| 237 |
notion_token = os.environ.get("NOTION_TOKEN")
|
| 238 |
|
|
|
|
| 218 |
# Read the request body as JSON
|
| 219 |
payload = await request.json()
|
| 220 |
|
| 221 |
+
print(str(payload))
|
| 222 |
+
|
|
|
|
|
|
|
| 223 |
|
| 224 |
# Accessing nested data in the 'event' object
|
| 225 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
speckle_token = os.environ.get("SPECKLE_TOKEN")
|
| 227 |
notion_token = os.environ.get("NOTION_TOKEN")
|
| 228 |
|