This repository was archived by the owner on Apr 16, 2024. It is now read-only.
🐛 BUG: Wasteful frontend course data requirements 🚯 #654
Labels
api
All Backend related Issues
bug
This Issue describes a unwanted behavior
web-frontend
All frontend related issues
Currently the frontend requires far more information than it should to display the dashboard.
E.g. for teachers, an array of the course's teachers is searched to determine whether or not the course belongs to the current user (see
filterMyCourses
in dashboard-teacher.component.ts).This worked in the past because the entire course information was leaked anyway, as noted in #594.
To fix those leaks in #594, without larger frontend changes, an overly complicated filter code was applied.
It would however be more sensible to properly minimize both the required data in the frontend, as well as the sent data in the backend.
The goal is thus to only send data that is actually necessary / intended for display in the frontend, without resorting to complex user-role-specific filtering.
At least changes of both
/api/courses/
getCourses and/api/courses/:id
getCourse in CourseController.ts are required, with accompanying frontend logic adjustments as needed:/api/courses/
getCourses response & working frontend/api/courses/:id
getCourse response & working frontendThe text was updated successfully, but these errors were encountered: