Update routes/subscription.py
Browse files- routes/subscription.py +2 -2
routes/subscription.py
CHANGED
@@ -170,10 +170,10 @@ async def create_price(
|
|
170 |
update_data = {"price_id": new_price_id}
|
171 |
update_response = requests.patch(supabase_url, headers=headers, json=update_data)
|
172 |
logger.info(f"🔹 Supabase PATCH response: {update_response.status_code} - {update_response.text}")
|
173 |
-
|
174 |
if update_response.status_code not in [200, 204]:
|
175 |
raise HTTPException(status_code=500, detail=f"Failed to update Supabase: {update_response.text}")
|
176 |
-
|
177 |
logger.info(f"✅ Successfully updated user {user_id} with new price_id {new_price_id}")
|
178 |
return {"message": "Price created successfully!", "price_id": new_price_id}
|
179 |
|
|
|
170 |
update_data = {"price_id": new_price_id}
|
171 |
update_response = requests.patch(supabase_url, headers=headers, json=update_data)
|
172 |
logger.info(f"🔹 Supabase PATCH response: {update_response.status_code} - {update_response.text}")
|
173 |
+
|
174 |
if update_response.status_code not in [200, 204]:
|
175 |
raise HTTPException(status_code=500, detail=f"Failed to update Supabase: {update_response.text}")
|
176 |
+
|
177 |
logger.info(f"✅ Successfully updated user {user_id} with new price_id {new_price_id}")
|
178 |
return {"message": "Price created successfully!", "price_id": new_price_id}
|
179 |
|