ucsb-cs156-f23 / proj-organic-f23-6pm-1

https://ucsb-cs156-f23.github.io/proj-organic-f23-6pm-1/
0 stars 0 forks source link

Delete Course and Course Staff for CourseController #44

Closed chauAlex closed 9 months ago

chauAlex commented 10 months ago

Implemented delete endpoint of CourseController which will delete the given course by courseId and all course staff that match this courseId.

Please review the use of @Transactional and deleting all of the course staff by a given courseId, not sure if this is the best way to do it.

Closes #21

pconrad commented 10 months ago

It looks like this does not allow an Admin to delete courses unless they are in the courseStaff table for that course. An Admin should be able to delete any course. Otherwise LGTM.

Agreed... please address this.

chauAlex commented 10 months ago

I have adjusted the endpoint to check IF they are not an admin to check the course staff, otherwise they can delete. I have also reflected these changes in the PUT endpoint as well.