fixed authcontext for sign up, added 404 and middleware for prod readiness

This commit is contained in:
2025-12-12 11:10:49 -05:00
parent 777618f684
commit 1757aba3e7
6 changed files with 504 additions and 6 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
async ({ email, password }: { email: string; password: string }) => {
setLoading(true);
try {
const res = await fetch(`${API_BASE_URL}/auth/login`, {
const res = await fetch(`${API_BASE_URL}/api/auth/login`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, password }),
@@ -130,7 +130,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
}) => {
setLoading(true);
try {
const res = await fetch(`${API_BASE_URL}/auth/register`, {
const res = await fetch(`${API_BASE_URL}/api/auth/register`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email, password, displayName }),