diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.py index 983a77a..9b94657 100644 --- a/backend/routes/generate_code.py +++ b/backend/routes/generate_code.py @@ -165,6 +165,8 @@ async def extract_params( await throw_error("Unknown error occurred. Contact support.") raise Exception("Unknown error occurred when checking subscription credits") + user_id = res.user_id + print("Payment method: ", payment_method) if payment_method is PaymentMethod.UNKNOWN: @@ -199,7 +201,7 @@ async def extract_params( ) return ExtractedParams( - user_id="fake_user_id", + user_id=user_id, stack=validated_stack, input_mode=validated_input_mode, code_generation_model=code_generation_model, diff --git a/backend/routes/saas_utils.py b/backend/routes/saas_utils.py index 0802eaa..c5043bb 100644 --- a/backend/routes/saas_utils.py +++ b/backend/routes/saas_utils.py @@ -5,6 +5,7 @@ from config import BACKEND_SAAS_URL class SubscriptionCreditsResponse(BaseModel): + user_id: str status: str