Update frontend to allow categories
This commit is contained in:
@@ -14,6 +14,7 @@ export async function fetchServer<T = unknown>(
|
||||
if (!authToken) redirect('/login');
|
||||
|
||||
try {
|
||||
console.log(`${endpoint}`)
|
||||
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}${endpoint}`, {
|
||||
...options,
|
||||
headers: {
|
||||
@@ -29,7 +30,7 @@ export async function fetchServer<T = unknown>(
|
||||
|
||||
return res.json();
|
||||
} catch (error) {
|
||||
console.error(`Server request to ${endpoint} failed:`, error);
|
||||
//console.error(`Server request to ${endpoint} failed:`, error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user