fixed login session for user name, and updated the api calls on the product detials pages.
CI / test (push) Successful in 6s

This commit is contained in:
2026-01-25 20:20:48 -05:00
parent 3aee0e6755
commit b09ccc542e
13 changed files with 256 additions and 21 deletions
@@ -238,8 +238,11 @@ export default function ProductDetailsPage() {
setLoading(true);
setError(null);
const url = `${API_BASE_URL}/api/v1/products/${numericId}`;
const res = await fetch(url, { signal: controller.signal });
const url = `/api/catalog/products/${numericId}`;
const res = await fetch(url, {
signal: controller.signal,
credentials: 'include',
});
if (!res.ok) {
throw new Error(`Failed to load product (${res.status})`);
@@ -272,8 +275,11 @@ export default function ProductDetailsPage() {
try {
setOffersLoading(true);
const url = `${API_BASE_URL}/api/v1/products/${numericId}/offers`;
const res = await fetch(url, { signal: controller.signal });
const url = `/api/catalog/products/${numericId}/offers`;
const res = await fetch(url, {
signal: controller.signal,
credentials: 'include',
});
if (!res.ok) {
throw new Error(`Failed to load offers (${res.status})`);