Skip to content

🔧 fix youtube video bug #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/api/models/MenteeProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion backend/api/models/MentorProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/components/LoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -187,7 +189,13 @@ function LoginForm({ role, defaultEmail, n50_flag, location }) {
},
]}
>
<Input prefix={<UserOutlined />} autoFocus />
<Input
onChange={(e) => {
form.setFieldsValue({ email: e.target.value.toLowerCase() });
}}
prefix={<UserOutlined />}
autoFocus
/>
</Form.Item>
<div style={{ position: "relative" }}>
<Form.Item
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/auth.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const sendPasswordResetEmail = (email) => {

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,
Expand Down