Update scrape.ts

This commit is contained in:
Nicolas 2024-08-30 17:09:44 -03:00
parent 012bc74e14
commit ef5c8931eb
1 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,9 @@ export async function scrapeController(
// Don't bill if we're early returning
return;
}
if(req.body.extract && req.body.formats.includes("extract")) {
creditsToBeBilled = 50;
}
const billingResult = await billTeam(req.auth.team_id, creditsToBeBilled);
if (!billingResult.success) {