fix: add /mobile prefix to all client-side fetch() calls for basePath
This commit is contained in:
@@ -100,7 +100,7 @@ export default function HalalMonitorPage() {
|
||||
const fetchUsage = useCallback(async () => {
|
||||
if (!token) return;
|
||||
try {
|
||||
const res = await fetch("/api/halal/usage", {
|
||||
const res = await fetch("/mobile/api/halal/usage", {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
});
|
||||
if (res.ok) {
|
||||
@@ -116,7 +116,7 @@ export default function HalalMonitorPage() {
|
||||
const fetchBookmarks = useCallback(async () => {
|
||||
if (!token) return;
|
||||
try {
|
||||
const res = await fetch("/api/halal/bookmarks", {
|
||||
const res = await fetch("/mobile/api/halal/bookmarks", {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
});
|
||||
if (res.ok) {
|
||||
@@ -133,7 +133,7 @@ export default function HalalMonitorPage() {
|
||||
if (!token) return;
|
||||
setUsageLoading(true);
|
||||
try {
|
||||
const res = await fetch("/api/halal/usage", {
|
||||
const res = await fetch("/mobile/api/halal/usage", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
@@ -198,7 +198,7 @@ export default function HalalMonitorPage() {
|
||||
});
|
||||
if (res.ok) fetchBookmarks();
|
||||
} else {
|
||||
const res = await fetch("/api/halal/bookmarks", {
|
||||
const res = await fetch("/mobile/api/halal/bookmarks", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
|
||||
Reference in New Issue
Block a user