MCPcopy Create free account
hub / github.com/code100x/cms / checkUserEmailForPurchase

Function checkUserEmailForPurchase

src/utiles/appx-check-mail.ts:12–31  ·  view source on GitHub ↗
(
  email: string,
  courseId: string,
)

Source from the content-addressed store, hash-verified

10};
11
12export async function checkUserEmailForPurchase(
13 email: string,
14 courseId: string,
15) {
16 const params = new URLSearchParams({
17 email,
18 itemtype: '10',
19 itemid: courseId,
20 });
21 try {
22 const response = await fetch(`${baseUrl}?${params.toString()}`, {
23 headers,
24 });
25 return await response.json();
26 } catch (error: any) {
27 if (error instanceof Error) {
28 console.log(error.message);
29 }
30 }
31}

Callers 2

refreshDbInternalFunction · 0.90
getPurchasesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected