fix: add /mobile prefix to all client-side fetch() calls for basePath

This commit is contained in:
root
2026-06-15 11:38:03 +02:00
parent 15300d3e42
commit 947fe3b66d
13 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ export default function NotificationBell() {
const fetchUnreadCount = async () => {
if (!token) return;
try {
const res = await fetch("/api/notifications/unread-count", {
const res = await fetch("/mobile/api/notifications/unread-count", {
headers: { Authorization: `Bearer ${token}` },
});
if (res.ok) {
+4 -4
View File
@@ -65,7 +65,7 @@ export default function NotificationPanel({
const fetchNotifications = useCallback(async () => {
if (!token) return;
try {
const res = await fetch("/api/notifications", {
const res = await fetch("/mobile/api/notifications", {
headers: { Authorization: `Bearer ${token}` },
});
if (res.ok) {
@@ -86,7 +86,7 @@ export default function NotificationPanel({
const markAsRead = async (id: string) => {
if (!token) return;
try {
const res = await fetch("/api/notifications", {
const res = await fetch("/mobile/api/notifications", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
@@ -108,7 +108,7 @@ export default function NotificationPanel({
const markAllAsRead = async () => {
if (!token) return;
try {
const res = await fetch("/api/notifications", {
const res = await fetch("/mobile/api/notifications", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
@@ -130,7 +130,7 @@ export default function NotificationPanel({
const refreshCount = async () => {
if (!token) return;
try {
const res = await fetch("/api/notifications/unread-count", {
const res = await fetch("/mobile/api/notifications/unread-count", {
headers: { Authorization: `Bearer ${token}` },
});
if (res.ok) {