get user_id when we check if the user has an active subscription

This commit is contained in:
Abi Raja 2024-09-18 15:27:56 +02:00
parent 1bf3340502
commit 06ce9f8c32
2 changed files with 4 additions and 1 deletions

View File

@ -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,

View File

@ -5,6 +5,7 @@ from config import BACKEND_SAAS_URL
class SubscriptionCreditsResponse(BaseModel):
user_id: str
status: str