# Routes - /api/v1 # Image - `https://picsum.photos/{new Date()}/picsum/200` ## Post - [x] **GET** /post/:postId **Akil** - **Query:** type to sort Comments by - time(default) - like - professional - **Response:** Post - [x] **GET** /post/feed **Akil** - **Query:** type to sort Posts by - time(default) - like - professional - **Response:** Posts - [x] **POST** /post/create **Akil** - **Request:** New Post - **Response:** "Your Post Has been created" - message - [x] **GET** /post/:postId/save **Akil** - **Response:** "Post Has been Saved!" - message - [x] **POST** /post/:postId/comment/create **Akil** - **Request:** New Comment - **Response:** New Comment - [x] **POST** /post/:postId/comment/:commentId/reply/create **AKil** - **Request:** New Reply - **Response:** New Reply - [x] **GET** /post/:postId/comment/:commentId/replies **Akil** - **Response:** All Replies of a certain comment - [x] **GET** /post/:postId/like **Akil** - **Reponse:** "Like Confirmation" - message - [ ] **GET** Report(probable) - [ ] **GET** Share(probable) - [ ] **POST** /post/:postId/edit - **Request:** Edits of the Post - **Response:** Edited Post - [ ] **POST** /post/:commentId/edit - **Request:** Edits of the Comment - **Response:** Edited Comment ## Community - [ ] **GET** /community/create **Fahim** - **Request:** Community Info - **Response:** Community - [x] **GET** /community/:communityId/information **Akil** - **Response:** Community General Information (isJoined) - [x] **GET** /community/:communityId/feed **Akil** - **Query:** type to sort Posts by - time(default) - like - professional - **Response:** Posts - [ ] **POST** /community/:communityId/search - **Request:** Search - **Response:** Relevent Information (Posts, User, Tests) - [x] **GET** /community/:communityId/about **Akil** - **Request:** Community About - **Response:** Details of the disease, links for further knowledge ## User - [ ] **GET** /user/professional/:userId/profile **Akil** - **Response:** Profile - [ ] **GET** /user/regular/:userId/profile **Rishov** - Three Cases: - `jwt & userId matches:` **Response:** Profile (Health) - `jwt & userId don't match:` **Response:** Profile - `jwt is Professional:` **Response:** Profile (Health) - [x] **GET** /user/:userId/posts **Akil** - **Response:** Posts - [x] **GET** /user/:userId/comments **Akil** - **Response:** Comments - [x] **POST** /user/professional/signup **Akil** - **Request:** Credentials - **Response:** Message: "Under Verification" - [x] **POST** /user/regular/signup **Akil** - **Request:** Credentials - **Response:** Sign Up Information( welcome message, jwt token, role) - [x] **POST** /user/login **Akil** - **Request:** Credentials - **Response:** ProfileInfo - [ ] **POST** /user/professional/edit **Rishov** - **Request:** Credentials - **Response:** ProfileInfo - [ ] **POST** /user/regular/edit **Rishov** - **Request:** Credentials - **Response:** ProfileInfo - [x] **GET** /user/communities **Akil** - **Response:** CommunityInfo - [ ] **GET** /user/communities/more - **Response:** CommunityInfo - [x] **GET** /user/community/:communityId/join **Akil** - **Response:** Message: Joined - [ ] **GET** /user/notifications - **Response:** Notifications **Rishov** - [x] **POST** /user/pushToken/register **Rishov** - **Request:** pushToken - **Response:** pushToken - [ ] **POST** /user/search - **Request:** Search - **Response:** Relevent Information (Posts, User, Tests, Community) - [x] **GET** /user/savedPosts **Akil** - **Response:** Saved Posts of a logged in user - [ ] **GET** /user/suggesetedProfessionals **Rishov** - **Query:** type to sort Professionals by - Best (Rating) - Location (closes to farthest) - **Response:** Professionla List with Ids - [x] **GET** /user/professional/:userid/chamber **Akil** - Response: Professional Detail Information( qualification, license, address etc) - [x] **GET** /user/professional/:userid/info **Akil** - Response: Professional General Information(specialization, rank, name) - [x] **GET** /user/tests/history - **Response:** Test History( test name, id, status, 3 scores array, timestamp ) - [ ] **GET** /user/tests/more - **Response:** Test name (Test name, times taken, id) - [x] **GET** /user/advice/latest - **Response:** Advice from latest testinfo/test taken - [ ] **GET** /user/notifier/turnoff - **Response:** Success Message ## Test - [x] **POST** /test/create - **Request:** Test Questions - **Response:** Created Test - [x] **GET** /test/:testId - **Response:** Test - [x] **POST** /test/:testId/submit - **Request:** Test Scores - **Response:** Advice - [ ] **GET** /test/advice/communities/suggested - **Response:** Suggested Communities(Array) based on score filtered by tags - [ ] **GET** /test/random - **Response:** Test - [x] **POST** test/advice/create - **Request:** Advice - **Response:** Newly created advice