feat: add public catalog web foundation

This commit is contained in:
2026-09-08 19:37:59 -04:00
parent a76d777a6b
commit 3d17637711
13 changed files with 2001 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:3000/api/v1';
export async function searchCatalog({ query = '', page = 1, limit = 20 } = {}) {
const params = new URLSearchParams({ query, page: String(page), limit: String(limit) });
const response = await fetch(`${apiBaseUrl}/public/search?${params}`);
if (!response.ok) {
throw new Error('Catalog search is unavailable.');
}
const payload = await response.json();
return payload.data;
}