diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsx index 53c5e5c..9f42012 100644 --- a/src/app/(auth)/login/page.tsx +++ b/src/app/(auth)/login/page.tsx @@ -14,7 +14,7 @@ export default function LoginPage() { const [showPassword, setShowPassword] = useState(false); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); - const [userType, setUserType] = useState<'USER' | 'ADMIN'>('USER'); + const [userType, setUserType] = useState<'USER' | 'AGENT'>('USER'); const [showResendVerification, setShowResendVerification] = useState(false); const [resendingVerification, setResendingVerification] = useState(false); const [resendSuccess, setResendSuccess] = useState(''); @@ -74,7 +74,7 @@ export default function LoginPage() { const validateRes = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/auth/login`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ email, password }), + body: JSON.stringify({ email, password, loginRole: userType }), }); const validateData = await validateRes.json(); @@ -164,14 +164,14 @@ export default function LoginPage() {