Closed chinathaip closed 6 months ago
This is a page to see the reviews of each course
https://www.figma.com/file/PXPMF9wEKCCGy8x1t0DVPJ/Course-Compose?type=design&node-id=0%3A1&mode=design&t=2XR2zFkFSFyocduy-1
GET
/api/courses/:courseCode/reviews?pageSize=10&pageNumber=1
"isOwner": true
POST
/api/courses/:courseCode/reviews
{ "academic_year": 2023, "description": "This course is good......", "rating": 2 }
// GET /api/courses/ITE221/reviews?pageNumber=1&pageSize=10 { "pageInformation": { "number": 1, "size": 10 }, "totalNumberOfItems": 2, "totalPages": 1, "data": [ { "id": 5, "academicYear": 2022, "description": "Some review for ITE221!", "rating": 2, "isOwner": true, "status": "APPROVED", "votes": 5, "course": { "id": 2, "code": "ITE221" }, "profile": { "id": "d5a59cb2-1f22-4e23-8ef0-7108e54f842b" }, "created_at": "2023-11-23T14:00:00Z" }, { "id": 9, "academicYear": 2022, "description": "Some review for ITE442", "rating": 2, "status": "APPROVED", "votes": 0, "course": { "id": 2, "code": "ITE221" }, "profile": { "id": "j2a59cb2-1f22-4e23-8ef0-7108e54f849s" }, "created_at": "2023-11-23T14:00:00Z" } ] }
I'll try my best !
Yessirr, let's start by creating the UI and display some course detail + reviews🔥
https://github.com/stamford-syntax-club/course-compose/pull/53
Overview
This is a page to see the reviews of each course
Design: @NayHtetKyaw
https://www.figma.com/file/PXPMF9wEKCCGy8x1t0DVPJ/Course-Compose?type=design&node-id=0%3A1&mode=design&t=2XR2zFkFSFyocduy-1
Frontend - @NayHtetKyaw
GET
request to/api/courses/:courseCode/reviews?pageSize=10&pageNumber=1
"isOwner": true
. It will be, if there is any, located at the first element of the arrayPOST
request to/api/courses/:courseCode/reviews
along with the JWT in the request header (Bearer)DTO