mk
Browse files- backend/api/sources.py +2 -1
backend/api/sources.py
CHANGED
|
@@ -106,11 +106,12 @@ def add_source():
|
|
| 106 |
current_app.logger.warning(f"Content service failed, storing in database directly: {str(e)}")
|
| 107 |
|
| 108 |
# Store source directly in Supabase
|
|
|
|
| 109 |
response = (
|
| 110 |
current_app.supabase
|
| 111 |
.table("Source")
|
| 112 |
.insert({
|
| 113 |
-
"
|
| 114 |
"user_id": user_id,
|
| 115 |
"created_at": "now()"
|
| 116 |
})
|
|
|
|
| 106 |
current_app.logger.warning(f"Content service failed, storing in database directly: {str(e)}")
|
| 107 |
|
| 108 |
# Store source directly in Supabase
|
| 109 |
+
# Corrected column name from 'url' to 'source' to match the database schema
|
| 110 |
response = (
|
| 111 |
current_app.supabase
|
| 112 |
.table("Source")
|
| 113 |
.insert({
|
| 114 |
+
"source": source_url, # Changed 'url' to 'source'
|
| 115 |
"user_id": user_id,
|
| 116 |
"created_at": "now()"
|
| 117 |
})
|