( email: string, courseId: string, )
| 10 | }; |
| 11 | |
| 12 | export 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 | } |
no outgoing calls
no test coverage detected