Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Nick: billing for map

Nicolas0c48c8a43699
diff --git a/apps/api/src/controllers/v1/map.ts b/apps/api/src/controllers/v1/map.ts
index 08d5ab611..76cf1498f 100644
--- a/apps/api/src/controllers/v1/map.ts
+++ b/apps/api/src/controllers/v1/map.ts
@@ -14,6 +14,7 @@ import {
isSameSubdomain,
} from "../../lib/validateUrl";
import { fireEngineMap } from "../../search/fireEngine";
+import { billTeam } from "../../services/billing/credit_billing";
configDotenv();
@@ -84,6 +85,8 @@ export async function mapController(
// remove duplicates that could be due to http/https or www
links = [...new Set(links)];
+ await billTeam(req.auth.team_id, 1);
+
return res.status(200).json({
success: true,
links,