From a1a8b6ecd56daccc6dea39400bbbc0c034703993 Mon Sep 17 00:00:00 2001 From: Amirhossein Khalili Date: Fri, 13 Mar 2026 18:31:54 +0800 Subject: [PATCH] fix(auth): incorrect authentication endpoint while renaming react route for login from '/login -> /auth' --- src/api/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/users.ts b/src/api/users.ts index 21925e8..1314193 100644 --- a/src/api/users.ts +++ b/src/api/users.ts @@ -3,7 +3,7 @@ import { authFetch } from './client'; // --- Auth Endpoints --- export const loginWithPassword = async (mobile: string, password: string) => { - const response = await authFetch('/api/users/auth/', { + const response = await authFetch('/api/users/login/', { method: 'POST', body: JSON.stringify({ mobile, password }) }); @@ -21,7 +21,7 @@ export const sendOtp = async (mobile: string, mode: string) => { }; export const loginWithOtp = async (mobile: string, otp: string) => { - const response = await authFetch('/api/users/otp/auth/', { + const response = await authFetch('/api/users/otp/login/', { method: 'POST', body: JSON.stringify({ mobile, otp }) });