Course Compose is a course-review website tailored for Stamford students, providing a platform for sharing and discovering insights about various courses
endpoint: POST /api/courses/:courseCode/reviews
request body:
{
"academic_year": 2023,
"description": "I hate this",
"rating": 2
}
response body:
// 201 created
"Succes"
// 400 bad request
"Invalid Request Body" (when either academic year or description is missing)
"User does not exist"
"Course does not exist"
"You have already written a review for this course"
// 401 unauthorized
"Only Stamford students can access this service" (email with domain @students.stamford.edu)
"Token is expired"
"Invalid Token"
// 500 internal server error
"Internal Server Error" (only log the error internally)
Make sure to review #15 firstendpoint:
POST /api/courses/:courseCode/reviews
request body:response body: