Update Saqel Platform: 2026-08-28 15:19:58

This commit is contained in:
Hamza-Ayed
2026-08-28 15:19:58 +03:00
parent 06461635bf
commit 070e80ea30
4 changed files with 30 additions and 40 deletions
+2 -2
View File
@@ -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') {
+4
View File
@@ -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 }));
}