Update Saqel Platform: 2026-08-28 15:19:58
This commit is contained in:
@@ -1923,7 +1923,7 @@ class StudentPortal
|
||||
const res = await fetch('/api/auth/otp/request', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ phone: phone, role: 'student' })
|
||||
body: JSON.stringify({ phone_number: phone, phone: phone, role: 'student' })
|
||||
});
|
||||
const data = await res.json();
|
||||
if (res.ok && data.status === 'success') {
|
||||
@@ -1950,7 +1950,7 @@ class StudentPortal
|
||||
const res = await fetch('/api/auth/otp/verify', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ phone: phone, otp_code: otp, role: 'student' })
|
||||
body: JSON.stringify({ phone_number: phone, phone: phone, otp: otp, otp_code: otp, role: 'student' })
|
||||
});
|
||||
const data = await res.json();
|
||||
if (res.ok && data.status === 'success') {
|
||||
|
||||
@@ -1281,6 +1281,10 @@ class TeacherPortal
|
||||
}
|
||||
const data = await res.json();
|
||||
if (res.ok && data.status === 'success') {
|
||||
if (!data.is_completed) {
|
||||
switchToOnboardingStep();
|
||||
return;
|
||||
}
|
||||
if (data.user) {
|
||||
localStorage.setItem('saqel_teacher_user', JSON.stringify({ ...data.user, ...data.profile }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user