feat(frontend) Connect create/edit/delete unit to backend (#58)
- Add create unit function that sends a POST request to the backend
- Add edit unit function that sends a PATCH request to the backend
- Add delete unit functionality that sends a DELETE request to the backend
- Add backend endpoint for updating Unit
- Add backend endpoint for deleting unit
- Fix small bugs in frontend
HOW TO TEST:
- Try to create new unit as a lecturer and it should appear on the CourseOverview page.
- Then try to edit the unit (need to be under upcoming units to be able to edit), and the unit should be updated.
- Then try to delete the unit by clicking on either open/edit unit and then delete unit.
Closes #58 (closed)
Edited by Jakob Opland