Update server-api.ts
This commit is contained in:
@@ -49,7 +49,7 @@ export async function fetchServer<T = unknown>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get auth token from cookies
|
// Get auth token from cookies
|
||||||
const cookieStore = await cookiesModule.cookies();
|
const cookieStore = await cookiesModule.cookies();
|
||||||
const authToken = cookieStore.get('Authorization')?.value;
|
const authToken = cookieStore.get('Authorization')?.value;
|
||||||
|
|
||||||
// Redirect to login if not authenticated
|
// Redirect to login if not authenticated
|
||||||
@@ -92,8 +92,6 @@ export async function fetchServer<T = unknown>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// =========== SERVER API SERVICES ===========
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a paginated list of customers (server-side)
|
* Get a paginated list of customers (server-side)
|
||||||
* @param page Page number (starting from 1)
|
* @param page Page number (starting from 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user