Nick: billing for map

This commit is contained in:
Nicolas 2024-08-20 16:43:46 -03:00
parent 39388cdc35
commit 0c48c8a436

View File

@ -14,6 +14,7 @@ import {
isSameSubdomain, isSameSubdomain,
} from "../../lib/validateUrl"; } from "../../lib/validateUrl";
import { fireEngineMap } from "../../search/fireEngine"; import { fireEngineMap } from "../../search/fireEngine";
import { billTeam } from "../../services/billing/credit_billing";
configDotenv(); configDotenv();
@ -84,6 +85,8 @@ export async function mapController(
// remove duplicates that could be due to http/https or www // remove duplicates that could be due to http/https or www
links = [...new Set(links)]; links = [...new Set(links)];
await billTeam(req.auth.team_id, 1);
return res.status(200).json({ return res.status(200).json({
success: true, success: true,
links, links,