Add API_BASE to AuthContext.tsx
cgen-546e43c8f9d0444b9d5ec87e43f89c10
This commit is contained in:
parent
da3a8c7c8e
commit
10e9411d36
1 changed files with 3 additions and 1 deletions
|
|
@ -11,6 +11,8 @@ import { User, Session } from "@supabase/supabase-js";
|
|||
import { supabase } from "@/lib/supabase";
|
||||
import { UserProfile } from "@/lib/database.types";
|
||||
import { aethexToast } from "@/lib/aethex-toast";
|
||||
|
||||
const API_BASE = (globalThis as any).import?.meta?.env?.VITE_API_BASE || "";
|
||||
import {
|
||||
aethexUserService,
|
||||
aethexRoleService,
|
||||
|
|
@ -504,7 +506,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
|||
) {
|
||||
try {
|
||||
// Check if this email is linked to another account
|
||||
const response = await fetch("/api/user/resolve-linked-email", {
|
||||
const response = await fetch(`${API_BASE}/api/user/resolve-linked-email`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ email }),
|
||||
|
|
|
|||
Loading…
Reference in a new issue