Update search.ts
This commit is contained in:
parent
5e80f8af87
commit
98d82c4cec
@ -44,7 +44,20 @@ export async function searchHelper(
|
||||
|
||||
let justSearch = pageOptions.fetchPageContent === false;
|
||||
|
||||
|
||||
if (justSearch) {
|
||||
const billingResult = await billTeam(
|
||||
team_id,
|
||||
res.length
|
||||
);
|
||||
if (!billingResult.success) {
|
||||
return {
|
||||
success: false,
|
||||
error:
|
||||
"Failed to bill team. Insufficient credits or subscription not found.",
|
||||
returnCode: 402,
|
||||
};
|
||||
}
|
||||
return { success: true, data: res, returnCode: 200 };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user