From 0c48c8a4369986ce5093722f372d89f07add0ca3 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 20 Aug 2024 16:43:46 -0300 Subject: [PATCH] Nick: billing for map --- apps/api/src/controllers/v1/map.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api/src/controllers/v1/map.ts b/apps/api/src/controllers/v1/map.ts index 08d5ab61..76cf1498 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,