fix(auth): incorrect authentication endpoint while renaming react route for login from '/login -> /auth'

This commit is contained in:
2026-03-13 18:31:54 +08:00
parent 56404792c6
commit a1a8b6ecd5

View File

@@ -3,7 +3,7 @@ import { authFetch } from './client';
// --- Auth Endpoints --- // --- Auth Endpoints ---
export const loginWithPassword = async (mobile: string, password: string) => { export const loginWithPassword = async (mobile: string, password: string) => {
const response = await authFetch('/api/users/auth/', { const response = await authFetch('/api/users/login/', {
method: 'POST', method: 'POST',
body: JSON.stringify({ mobile, password }) 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) => { 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', method: 'POST',
body: JSON.stringify({ mobile, otp }) body: JSON.stringify({ mobile, otp })
}); });