Fix Lorcana API endpoints based on official documentation - update to correct API URLs

This commit is contained in:
Randall Stillwell 2025-07-23 06:28:22 -05:00
parent 5aa168bd24
commit 0a09b333c4
2 changed files with 5 additions and 5 deletions

View file

@ -13,18 +13,18 @@ export async function GET(request) {
let headers = {};
if (api === 'lorcana') {
// Lorcana API
// Lorcana API - using correct endpoint from docs
if (search) {
url = `https://lorcana-api.com/api/v1/cards?search=${encodeURIComponent(search)}`;
url = `https://api.lorcana-api.com/cards?search=${encodeURIComponent(search)}`;
} else {
url = `https://lorcana-api.com/api/v1/cards?limit=${limit}`;
url = `https://api.lorcana-api.com/cards?limit=${limit}`;
}
headers = {
'Accept': 'application/json',
'User-Agent': 'TCG-Vault/1.0'
};
} else {
// Lorcast API
// Lorcast API - using correct endpoint from docs
if (query) {
url = `https://api.lorcast.com/v0/cards?q=${encodeURIComponent(query)}`;
} else {

View file

@ -5,7 +5,7 @@ const SCRYFALL_BASE_URL = 'https://api.scryfall.com';
const POKEMON_API_BASE_URL = 'https://api.pokemontcg.io/v2';
const YUGIOH_API_BASE_URL = 'https://db.ygoprodeck.com/api/v7';
const LORCAST_API_BASE_URL = 'https://api.lorcast.com/v0';
const LORCANA_API_BASE_URL = 'https://lorcana-api.com/api/v1';
const LORCANA_API_BASE_URL = 'https://api.lorcana-api.com';
const PROXY_API_BASE_URL = 'https://tcg-vault.vercel.app/api/proxy/lorcana';