From a5e4dab0f3da87f100061bb2ed7c8d33f239b9d9 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Thu, 13 Nov 2025 02:55:22 +0000 Subject: [PATCH] Fix relative URLs in aethex-social-service.ts cgen-1d5d8726219d4a3183cdc9cbed489f2f --- client/lib/aethex-social-service.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/lib/aethex-social-service.ts b/client/lib/aethex-social-service.ts index 69c2a5f5..78883abb 100644 --- a/client/lib/aethex-social-service.ts +++ b/client/lib/aethex-social-service.ts @@ -81,7 +81,7 @@ export const aethexSocialService = { }, async followUser(followerId: string, followingId: string): Promise { - const resp = await fetch("/api/social/follow", { + const resp = await fetch(`${API_BASE}/api/social/follow`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -93,7 +93,7 @@ export const aethexSocialService = { }, async unfollowUser(followerId: string, followingId: string): Promise { - const resp = await fetch("/api/social/unfollow", { + const resp = await fetch(`${API_BASE}/api/social/unfollow`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -105,7 +105,7 @@ export const aethexSocialService = { }, async sendInvite(inviterId: string, email: string, message?: string | null) { - const resp = await fetch("/api/invites", { + const resp = await fetch(`${API_BASE}/api/invites`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -127,14 +127,14 @@ export const aethexSocialService = { async listInvites(inviterId: string) { const resp = await fetch( - `/api/invites?inviter_id=${encodeURIComponent(inviterId)}`, + `${API_BASE}/api/invites?inviter_id=${encodeURIComponent(inviterId)}`, ); if (!resp.ok) return []; return await resp.json(); }, async acceptInvite(token: string, acceptorId: string) { - const resp = await fetch("/api/invites/accept", { + const resp = await fetch(`${API_BASE}/api/invites/accept`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ token, acceptor_id: acceptorId }), @@ -147,7 +147,7 @@ export const aethexSocialService = { }, async applyReward(userId: string, action: string, amount?: number) { - const resp = await fetch("/api/rewards/apply", { + const resp = await fetch(`${API_BASE}/api/rewards/apply`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ user_id: userId, action, amount }), @@ -179,7 +179,7 @@ export const aethexSocialService = { }, async endorseSkill(endorserId: string, endorsedId: string, skill: string) { - const resp = await fetch("/api/social/endorse", { + const resp = await fetch(`${API_BASE}/api/social/endorse`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -206,7 +206,7 @@ export const aethexSocialService = { qs.set("available", String(params.available)); if (params?.limit) qs.set("limit", String(params.limit)); const resp = await fetch( - `/api/mentors${qs.toString() ? `?${qs.toString()}` : ""}`, + `${API_BASE}/api/mentors${qs.toString() ? `?${qs.toString()}` : ""}`, ); if (!resp.ok) return [] as any[]; return (await resp.json()) as any[]; @@ -221,7 +221,7 @@ export const aethexSocialService = { available?: boolean; }, ) { - const resp = await fetch("/api/mentors/apply", { + const resp = await fetch(`${API_BASE}/api/mentors/apply`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -243,7 +243,7 @@ export const aethexSocialService = { mentorId: string, message?: string, ) { - const resp = await fetch("/api/mentorship/request", { + const resp = await fetch(`${API_BASE}/api/mentorship/request`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({