restructure pages dir

This commit is contained in:
KS Jannette
2026-03-04 22:07:05 -05:00
parent dcbf0756d2
commit a2d1ff9d76
19 changed files with 1568 additions and 1485 deletions

View File

@@ -14,6 +14,20 @@ export async function createCheckoutSession() {
return res.json();
}
export async function verifyCheckoutSession(sessionId) {
const headers = await getAuthHeaders();
const res = await fetch(`${API_BASE}/stripe/verify-checkout`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({ session_id: sessionId }),
});
if (!res.ok) {
const data = await res.json();
throw new Error(data.message || "Failed to verify checkout session");
}
return res.json();
}
export async function getSubscriptionStatus() {
const headers = await getAuthHeaders();
const res = await fetch(`${API_BASE}/stripe/subscription-status`, {