get user_id when we check if the user has an active subscription
This commit is contained in:
parent
1bf3340502
commit
06ce9f8c32
@ -165,6 +165,8 @@ async def extract_params(
|
|||||||
await throw_error("Unknown error occurred. Contact support.")
|
await throw_error("Unknown error occurred. Contact support.")
|
||||||
raise Exception("Unknown error occurred when checking subscription credits")
|
raise Exception("Unknown error occurred when checking subscription credits")
|
||||||
|
|
||||||
|
user_id = res.user_id
|
||||||
|
|
||||||
print("Payment method: ", payment_method)
|
print("Payment method: ", payment_method)
|
||||||
|
|
||||||
if payment_method is PaymentMethod.UNKNOWN:
|
if payment_method is PaymentMethod.UNKNOWN:
|
||||||
@ -199,7 +201,7 @@ async def extract_params(
|
|||||||
)
|
)
|
||||||
|
|
||||||
return ExtractedParams(
|
return ExtractedParams(
|
||||||
user_id="fake_user_id",
|
user_id=user_id,
|
||||||
stack=validated_stack,
|
stack=validated_stack,
|
||||||
input_mode=validated_input_mode,
|
input_mode=validated_input_mode,
|
||||||
code_generation_model=code_generation_model,
|
code_generation_model=code_generation_model,
|
||||||
|
|||||||
@ -5,6 +5,7 @@ from config import BACKEND_SAAS_URL
|
|||||||
|
|
||||||
|
|
||||||
class SubscriptionCreditsResponse(BaseModel):
|
class SubscriptionCreditsResponse(BaseModel):
|
||||||
|
user_id: str
|
||||||
status: str
|
status: str
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user