diff --git a/backend/api/models/MenteeProfile.py b/backend/api/models/MenteeProfile.py index 9c4b6621c..700f4d9ea 100644 --- a/backend/api/models/MenteeProfile.py +++ b/backend/api/models/MenteeProfile.py @@ -25,7 +25,8 @@ class MenteeProfile(Document, Mixin): text_notifications = BooleanField(required=True) email_notifications = BooleanField(required=True) is_private = BooleanField(required=True) - video = EmbeddedDocumentField(Video) + # video = EmbeddedDocumentField(Video) + video = StringField() favorite_mentors_ids = ListField(StringField()) specializations = ListField(StringField()) pair_partner = DictField(required=False) diff --git a/backend/api/models/MentorProfile.py b/backend/api/models/MentorProfile.py index 638f2fe1d..42c3c2fa2 100644 --- a/backend/api/models/MentorProfile.py +++ b/backend/api/models/MentorProfile.py @@ -25,7 +25,8 @@ class MentorProfile(Document, Mixin): offers_in_person = BooleanField(required=False, default=False) offers_group_appointments = BooleanField(required=False, default=False) videos = ListField(EmbeddedDocumentField(Video)) - video = EmbeddedDocumentField(Video) + # video = EmbeddedDocumentField(Video) + video = StringField() availability = ListField(EmbeddedDocumentField(Availability)) taking_appointments = BooleanField(required=False) text_notifications = BooleanField(required=True) diff --git a/frontend/src/components/LoginForm.js b/frontend/src/components/LoginForm.js index 39ab97eef..cee8e6abc 100644 --- a/frontend/src/components/LoginForm.js +++ b/frontend/src/components/LoginForm.js @@ -23,10 +23,12 @@ function LoginForm({ role, defaultEmail, n50_flag, location }) { const { user } = useSelector((state) => state.user); const [loading, setLoading] = useState(false); const [messageApi, contextHolder] = message.useMessage(); + const [form] = Form.useForm(); const onFinish = async ({ email, password }) => { if (role == null) return; setLoading(true); + email = email.toLowerCase(); // Non-admin checking for status of account if ( @@ -187,7 +189,13 @@ function LoginForm({ role, defaultEmail, n50_flag, location }) { }, ]} > - } autoFocus /> + { + form.setFieldsValue({ email: e.target.value.toLowerCase() }); + }} + prefix={} + autoFocus + />
{ export const login = async (email, password, role, path = undefined) => await post("/login", { - email: email && email.trim(), + email: email && email.trim().toLowerCase(), password: password && password.trim(), role: String(role) && String(role).trim(), path: path,