fix: checkout API accessible via domain

This commit is contained in:
artale 2026-06-04 14:01:47 +02:00
parent ea8d6c7e4d
commit f7c064c64c
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ onMounted(async () => {
document.getElementById('status').textContent = `Creating checkout session for ${price.name}...` document.getElementById('status').textContent = `Creating checkout session for ${price.name}...`
try { try {
const resp = await fetch('/api/checkout', { // Try domain URL first, fall back to direct IP
const apiUrl = 'https://git.fdsa.agency/api'
const resp = await fetch(apiUrl, {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ body: JSON.stringify({