mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 13:05:54 +08:00
fix(credit_billing): teams check
This commit is contained in:
parent
ae010a76c1
commit
7b05512054
@ -1,13 +1,10 @@
|
|||||||
import { NotificationType } from "../../types";
|
import { NotificationType } from "../../types";
|
||||||
import { withAuth } from "../../lib/withAuth";
|
import { withAuth } from "../../lib/withAuth";
|
||||||
import { sendNotification } from "../notification/email_notification";
|
import { sendNotification } from "../notification/email_notification";
|
||||||
import { supabase_service } from "../supabase";
|
import { supabase_rr_service, supabase_service } from "../supabase";
|
||||||
import { logger } from "../../lib/logger";
|
import { logger } from "../../lib/logger";
|
||||||
import * as Sentry from "@sentry/node";
|
import * as Sentry from "@sentry/node";
|
||||||
import { AuthCreditUsageChunk } from "../../controllers/v1/types";
|
import { AuthCreditUsageChunk } from "../../controllers/v1/types";
|
||||||
import { getACUC, setCachedACUC } from "../../controllers/auth";
|
|
||||||
import { issueCredits } from "./issue_credits";
|
|
||||||
import { redlock } from "../redlock";
|
|
||||||
import { autoCharge } from "./auto_charge";
|
import { autoCharge } from "./auto_charge";
|
||||||
import { getValue, setValue } from "../redis";
|
import { getValue, setValue } from "../redis";
|
||||||
import { queueBillingOperation } from "./batch_billing";
|
import { queueBillingOperation } from "./batch_billing";
|
||||||
@ -117,7 +114,7 @@ export async function supaCheckTeamCredits(
|
|||||||
isAutoRechargeEnabled = parsedData.auto_recharge;
|
isAutoRechargeEnabled = parsedData.auto_recharge;
|
||||||
autoRechargeThreshold = parsedData.auto_recharge_threshold;
|
autoRechargeThreshold = parsedData.auto_recharge_threshold;
|
||||||
} else {
|
} else {
|
||||||
const { data, error } = await supabase_service
|
const { data, error } = await supabase_rr_service
|
||||||
.from("teams")
|
.from("teams")
|
||||||
.select("auto_recharge, auto_recharge_threshold")
|
.select("auto_recharge, auto_recharge_threshold")
|
||||||
.eq("id", team_id)
|
.eq("id", team_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user