fixed authcontext for sign up, added 404 and middleware for prod readiness
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user