mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Update auth.ts
This commit is contained in:
parent
d25d7e7244
commit
8f5174ffc7
|
@ -197,7 +197,6 @@ export async function supaAuthenticateUser(
|
||||||
|
|
||||||
return { success: true, team_id: subscriptionData.team_id, plan: subscriptionData.plan ?? ""};
|
return { success: true, team_id: subscriptionData.team_id, plan: subscriptionData.plan ?? ""};
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPlanByPriceId(price_id: string) {
|
function getPlanByPriceId(price_id: string) {
|
||||||
switch (price_id) {
|
switch (price_id) {
|
||||||
case process.env.STRIPE_PRICE_ID_STARTER:
|
case process.env.STRIPE_PRICE_ID_STARTER:
|
||||||
|
@ -206,11 +205,14 @@ function getPlanByPriceId(price_id: string) {
|
||||||
return 'standard';
|
return 'standard';
|
||||||
case process.env.STRIPE_PRICE_ID_SCALE:
|
case process.env.STRIPE_PRICE_ID_SCALE:
|
||||||
return 'scale';
|
return 'scale';
|
||||||
case process.env.STRIPE_PRICE_ID_HOBBY || process.env.STRIPE_PRICE_ID_HOBBY_YEARLY:
|
case process.env.STRIPE_PRICE_ID_HOBBY:
|
||||||
|
case process.env.STRIPE_PRICE_ID_HOBBY_YEARLY:
|
||||||
return 'hobby';
|
return 'hobby';
|
||||||
case process.env.STRIPE_PRICE_ID_STANDARD_NEW || process.env.STRIPE_PRICE_ID_STANDARD_NEW_YEARLY:
|
case process.env.STRIPE_PRICE_ID_STANDARD_NEW:
|
||||||
|
case process.env.STRIPE_PRICE_ID_STANDARD_NEW_YEARLY:
|
||||||
return 'standardnew';
|
return 'standardnew';
|
||||||
case process.env.STRIPE_PRICE_ID_GROWTH || process.env.STRIPE_PRICE_ID_GROWTH_YEARLY:
|
case process.env.STRIPE_PRICE_ID_GROWTH:
|
||||||
|
case process.env.STRIPE_PRICE_ID_GROWTH_YEARLY:
|
||||||
return 'growth';
|
return 'growth';
|
||||||
default:
|
default:
|
||||||
return 'free';
|
return 'free';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user