Replace apiRequest with clientFetch across app
Refactored all API calls to use the new clientFetch utility instead of apiRequest in dashboard pages, modal components, and profit analytics service. This improves consistency and aligns with updated API handling patterns.
This commit is contained in:
@@ -131,9 +131,12 @@ export default function BroadcastDialog({ open, setOpen }: BroadcastDialogProps)
|
||||
|
||||
response = await res.json();
|
||||
} else {
|
||||
response = await apiRequest("/storefront/broadcast", "POST", {
|
||||
message: broadcastMessage,
|
||||
productIds: selectedProducts
|
||||
response = await clientFetch("/storefront/broadcast", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
message: broadcastMessage,
|
||||
productIds: selectedProducts
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user