Fix Lorcana API endpoints based on official documentation - update to correct API URLs
This commit is contained in:
parent
5aa168bd24
commit
0a09b333c4
2 changed files with 5 additions and 5 deletions
|
|
@ -13,18 +13,18 @@ export async function GET(request) {
|
||||||
let headers = {};
|
let headers = {};
|
||||||
|
|
||||||
if (api === 'lorcana') {
|
if (api === 'lorcana') {
|
||||||
// Lorcana API
|
// Lorcana API - using correct endpoint from docs
|
||||||
if (search) {
|
if (search) {
|
||||||
url = `https://lorcana-api.com/api/v1/cards?search=${encodeURIComponent(search)}`;
|
url = `https://api.lorcana-api.com/cards?search=${encodeURIComponent(search)}`;
|
||||||
} else {
|
} else {
|
||||||
url = `https://lorcana-api.com/api/v1/cards?limit=${limit}`;
|
url = `https://api.lorcana-api.com/cards?limit=${limit}`;
|
||||||
}
|
}
|
||||||
headers = {
|
headers = {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'User-Agent': 'TCG-Vault/1.0'
|
'User-Agent': 'TCG-Vault/1.0'
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// Lorcast API
|
// Lorcast API - using correct endpoint from docs
|
||||||
if (query) {
|
if (query) {
|
||||||
url = `https://api.lorcast.com/v0/cards?q=${encodeURIComponent(query)}`;
|
url = `https://api.lorcast.com/v0/cards?q=${encodeURIComponent(query)}`;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const SCRYFALL_BASE_URL = 'https://api.scryfall.com';
|
||||||
const POKEMON_API_BASE_URL = 'https://api.pokemontcg.io/v2';
|
const POKEMON_API_BASE_URL = 'https://api.pokemontcg.io/v2';
|
||||||
const YUGIOH_API_BASE_URL = 'https://db.ygoprodeck.com/api/v7';
|
const YUGIOH_API_BASE_URL = 'https://db.ygoprodeck.com/api/v7';
|
||||||
const LORCAST_API_BASE_URL = 'https://api.lorcast.com/v0';
|
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';
|
const PROXY_API_BASE_URL = 'https://tcg-vault.vercel.app/api/proxy/lorcana';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue