RealDevSquad / RealDevSquad/website-backend
Sync User Profile Image on Discord and RealDevSquad V1 [RFC]
Open
@ivinayakg is already working on this.
Since Feb 24, 2024.
feature task
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Brief
- Right now, any user can change their profile picture on
RealDevSquadorDiscord, leading to inconsistency between the profile images on different profiles. - The System is already built #1094, this task is about sharpening the edges and activating this behind the feature flag.
- Also added a new key
status, to thephoto-verificationobject which can have the values ofACCEPTED, PENDING, and REJECTED, which will help in simplifying the querying of the objects based on their status. note - thestatuswill turn toACCEPTEDonly when both theprofile.approvedanddiscord.profileis approved.
User Flows
- When a user updates their profile image from the
my-site.- Backend API, to create a
PHOTO_VERIFICATION, which will store the previous as well as the requested changes. - Backend API, to approve
PHOTO_VERIFICATIONonly bySUPERUSERand then make the user profile changes. - Show all
PHOTO_VERIFICATIONondashboard-site.- Will show current profile photo, new profile photo as well as the current discord profile photo.
- Three options
Approve,Reject&Refresh Discord Avatar
- Backend API, to create a
API Docs
/discord-actions/avatar/update/:discordId, this API will be responsible for updating the discord avatar URL in aPENDINGstatusphoto-verificationobject. Only forSUPERUSER./picture/all, this API will be responsible for querying all the currentPENDINGstatusphoto-verificationobjects back. It can also acceptusernameas a query parameter to filter. Only forSUPERUSER/picture/:userId, will be responsible for querying all the currentPENDINGstatusphoto-verificationobjects back for theuserIdprovided.SUPERUSERcan run this for anyuserId, while other users can only run for their ownuserId.
Dashboard
- A basic UI for
SUPERUSERto interact with photo-verification objects. Giving the user the ability to perform all of the above actions and also more in the future.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.