Closed koramazzz closed 1 month ago
I have created the initial profile page. Right now, it uses mock data because API calls are not implemented yet. These are the API calls that we need for this page:
GET /api/me GET /api/profile/{userId} PATCH /api/profile/{userId} POST /api/profile/{userId}/experience PUT /api/profile/{userId}/experience/{expId} DELETE /api/profile/{userId}/experience/{expId} POST /api/profile/{userId}/education PUT /api/profile/{userId}/education/{eduId} DELETE /api/profile/{userId}/education/{eduId} PATCH /api/profile/{userId}/skills PATCH /api/profile/{userId}/interests GET /api/profile/{userId}/badges POST /api/profile/{userId}/badges DELETE /api/profile/{userId}/badges/{badgeId} GET /api/my/applications GET /api/my/activity
Remember that endpoints can change; these are just examples. Also, you can mention me if you need any more details.
It will be perfect if you can implement these as soon as possible. After that, I will update my code and create a pull request.
@buraktigin @Asaf31214 @CotSezer
Overall it looks great and covers most of the acceptance criteria, but there are two unsatisfied requirements:
Once those two are in place, this will fully satisfy User Profile Requirements. Great job on the rest.
I’ve completed the missing parts mentioned in the review. Here’s what has been implemented:
Users can now upload a new profile picture via gallery or camera and also remove their existing one.
Endpoints:
POST /api/profile/{userId}/profile-picture
DELETE /api/profile/{userId}/profile-picture
Badge management logic has been revised. Badges are now earned automatically by the system based on user activity (e.g. posting messages, completing actions), and cannot be manually created by users.
Endpoints (logic updated):
GET /api/profile/{userId}/badges
POST /api/profile/{userId}/badges
DELETE /api/profile/{userId}/badges/{badgeId}
GET /api/me
GET /api/profile/{userId}
PATCH /api/profile/{userId}
POST /api/profile/{userId}/profile-picture
DELETE /api/profile/{userId}/profile-picture
POST /api/profile/{userId}/experience
PUT /api/profile/{userId}/experience/{expId}
DELETE /api/profile/{userId}/experience/{expId}
POST /api/profile/{userId}/education
PUT /api/profile/{userId}/education/{eduId}
DELETE /api/profile/{userId}/education/{eduId}
PATCH /api/profile/{userId}/skills
PATCH /api/profile/{userId}/interests
GET /api/profile/{userId}/badges
POST /api/profile/{userId}/badges
DELETE /api/profile/{userId}/badges/{badgeId}
GET /api/my/applications
GET /api/my/activity
PATCH /api/profile/{userId}/mentor-status
I provided the endpoints except the last three. You can reach doc of api's here.
✅ Profile Picture Upload/Editing
Users can now upload a new profile picture via gallery or camera and also remove their existing one.
Endpoints:
POST /api/profile/{userId}/profile-picture
DELETE /api/profile/{userId}/profile-picture
Part was only provided by sending and receiving strings. In my issue #137 and corresponding PR #138, I have developed these endpoints to actually receive and send images. We can now POST images by providing form-data body containing a field with key: "file".
Also, in other Profile API functionality, profile image is returned as an URL which can be integrated in frontend or mobile applications. There is also a placeholder image, which is provided to all created profiles by default.
Title:
[Task] Profile Page
Task Description
Create the Profile page for the mobile app, allowing users to view and edit their profile details in accordance with the provided mockups and diagrams.
Acceptance Criteria
Deadline
2.05.2025 Friday 23:59
Estimated Workload
6 hours
Dependencies
Reviewer
@enverern
Review Deadline
3.05.2025 Saturday 23:59