weee
This commit is contained in:
@@ -70,7 +70,7 @@ export default function AdminAnalytics() {
|
||||
.find((row) => row.startsWith("Authorization="))
|
||||
?.split("=")[1];
|
||||
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/admin/analytics?range=${dateRange}`, {
|
||||
const response = await fetch(`/api/admin/analytics?range=${dateRange}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
|
||||
@@ -113,7 +113,7 @@ export default function BroadcastDialog({ open, setOpen }: BroadcastDialogProps)
|
||||
formData.append('message', broadcastMessage);
|
||||
}
|
||||
|
||||
const res = await fetch(`${API_URL}/storefront/broadcast`, {
|
||||
const res = await fetch(`/api/storefront/broadcast`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
|
||||
@@ -106,7 +106,7 @@ export default function ImportProductsModal({ open, setOpen, onImportComplete }:
|
||||
const authToken = document.cookie.split("Authorization=")[1];
|
||||
|
||||
// Send to API
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/products/batch`, {
|
||||
const response = await fetch(`/api/products/batch`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user