Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,8 +102,13 @@ async def messageAPI():
|
|
| 102 |
author = data["author"]
|
| 103 |
response = (
|
| 104 |
supabase.table("messages")
|
| 105 |
-
.insert()
|
|
|
|
| 106 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
|
| 109 |
|
|
|
|
| 102 |
author = data["author"]
|
| 103 |
response = (
|
| 104 |
supabase.table("messages")
|
| 105 |
+
.insert({"author_name": author, "content": msg})
|
| 106 |
+
.execute()
|
| 107 |
)
|
| 108 |
+
try:
|
| 109 |
+
data = response.data
|
| 110 |
+
except:
|
| 111 |
+
return make_response({"message": "something went wrong"})
|
| 112 |
|
| 113 |
|
| 114 |
|