From b4bdd4a6d6c6024dfc2a8fa9223f2a932ed7b8fe Mon Sep 17 00:00:00 2001 From: JManion32 Date: Fri, 6 Mar 2026 19:45:00 -0500 Subject: [PATCH] Fix api routes --- src/contexts/AuthContext.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contexts/AuthContext.tsx b/src/contexts/AuthContext.tsx index e709f31..7b8fae9 100644 --- a/src/contexts/AuthContext.tsx +++ b/src/contexts/AuthContext.tsx @@ -33,7 +33,7 @@ export const AuthProvider: React.FC = ({ children }) => { try { setLoading(true); - const response = await fetch('https://api.capyrpi.org/v1/auth/me', { + const response = await fetch('https://capyrpi.org/api/v1/auth/me', { headers: { Accept: 'application/json' }, credentials: 'include', }); @@ -62,14 +62,14 @@ export const AuthProvider: React.FC = ({ children }) => { const login = (provider: 'google' | 'microsoft'): void => { const url = provider === 'google' - ? 'https://api.capyrpi.org/v1/auth/google' - : 'https://api.capyrpi.org/v1/auth/microsoft'; + ? 'https://capyrpi.org/api/v1/auth/google' + : 'https://capyrpi.org/api/v1/auth/microsoft'; window.open(url, '_blank'); const pollInterval = setInterval(async () => { try { - const response = await fetch('https://api.capyrpi.org/v1/auth/me', { + const response = await fetch('https://capyrpi.org/api/v1/auth/me', { headers: { Accept: 'application/json' }, credentials: 'include', }); @@ -92,7 +92,7 @@ export const AuthProvider: React.FC = ({ children }) => { }; const logout = async (): Promise => { try { - await fetch('https://api.capyrpi.org/v1/auth/logout', { + await fetch('https://capyrpi.org/api/v1/auth/logout', { method: 'POST', });