Skip to content

Commit b4bdd4a

Browse files
committed
Fix api routes
1 parent c9e9562 commit b4bdd4a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/contexts/AuthContext.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
3333
try {
3434
setLoading(true);
3535

36-
const response = await fetch('https://api.capyrpi.org/v1/auth/me', {
36+
const response = await fetch('https://capyrpi.org/api/v1/auth/me', {
3737
headers: { Accept: 'application/json' },
3838
credentials: 'include',
3939
});
@@ -62,14 +62,14 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
6262
const login = (provider: 'google' | 'microsoft'): void => {
6363
const url =
6464
provider === 'google'
65-
? 'https://api.capyrpi.org/v1/auth/google'
66-
: 'https://api.capyrpi.org/v1/auth/microsoft';
65+
? 'https://capyrpi.org/api/v1/auth/google'
66+
: 'https://capyrpi.org/api/v1/auth/microsoft';
6767

6868
window.open(url, '_blank');
6969

7070
const pollInterval = setInterval(async () => {
7171
try {
72-
const response = await fetch('https://api.capyrpi.org/v1/auth/me', {
72+
const response = await fetch('https://capyrpi.org/api/v1/auth/me', {
7373
headers: { Accept: 'application/json' },
7474
credentials: 'include',
7575
});
@@ -92,7 +92,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
9292
};
9393
const logout = async (): Promise<void> => {
9494
try {
95-
await fetch('https://api.capyrpi.org/v1/auth/logout', {
95+
await fetch('https://capyrpi.org/api/v1/auth/logout', {
9696
method: 'POST',
9797
});
9898

0 commit comments

Comments
 (0)