Closed chinathaip closed 6 months ago
This is a page for displaying all the reviews which that users have written.
This should help users keep track of their review status (See which reviews of theirs have been approved, rejected, or still pending)
No design as of now, please start drafting here: https://www.figma.com/file/PXPMF9wEKCCGy8x1t0DVPJ/Course-Compose?type=design&node-id=0%3A1&mode=design&t=2XR2zFkFSFyocduy-1
[x] Creates an endpoint GET /api/myreviews which retrieves all reviews submitted by user
GET /api/myreviews
PENDING
APPROVED
REJECTED
[x] Extract user id from JWT claims and use it to the query
[x] It should not return any reviews that are not from the user
Because we have a very limited time, the pagination query will be forced to return the entire thing (9999 items max)
// GET /api/myreviews { "pageInformation": { "number": 1, "size": 9999 }, "totalNumberOfItems": 2, "totalPages": 1, "data": [ { "id": 5, "academicYear": 2022, "description": "Some review for ITE221!", "rating": 2, "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": "PENDING", "votes": 0, "course": { "id": 5, "code": "ITE442" }, "profile": { "id": "d5a59cb2-1f22-4e23-8ef0-7108e54f842b" }, "created_at": "2023-11-23T14:00:00Z" } ] }
https://github.com/stamford-syntax-club/course-compose/pull/58
Overview
This is a page for displaying all the reviews which that users have written.
This should help users keep track of their review status (See which reviews of theirs have been approved, rejected, or still pending)
Design: - @chinathaip & @CryoMilo
No design as of now, please start drafting here: https://www.figma.com/file/PXPMF9wEKCCGy8x1t0DVPJ/Course-Compose?type=design&node-id=0%3A1&mode=design&t=2XR2zFkFSFyocduy-1
Backend - @chinathaip
[x] Creates an endpoint
GET /api/myreviews
which retrieves all reviews submitted by userPENDING
,APPROVED
,REJECTED
[x] Extract user id from JWT claims and use it to the query
[x] It should not return any reviews that are not from the user
Frontend - @CryoMilo
GET /api/myreviews
DTO
Because we have a very limited time, the pagination query will be forced to return the entire thing (9999 items max)