From 0db9844e77414647e3e6e3dfa428f69cbc7dad7c Mon Sep 17 00:00:00 2001 From: Jagraj Aulakh Date: Thu, 13 Apr 2023 14:51:40 -0400 Subject: [PATCH] Add instructor as an enrolled user to a course. Also change frontend to use instructor role instead of teacher --- backend/app/routes.py | 1 + frontend/src/pages/RegisterPage.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/routes.py b/backend/app/routes.py index 14eec9e..26994d0 100644 --- a/backend/app/routes.py +++ b/backend/app/routes.py @@ -109,6 +109,7 @@ def create_course(): c = Course() c.from_dict(data) + u.enroll(c) db.session.add(c) db.session.commit() diff --git a/frontend/src/pages/RegisterPage.jsx b/frontend/src/pages/RegisterPage.jsx index 37796d5..83cec48 100644 --- a/frontend/src/pages/RegisterPage.jsx +++ b/frontend/src/pages/RegisterPage.jsx @@ -62,7 +62,7 @@ const RegisterPage = () => { }} > - +