RealDevSquad / RealDevSquad/website-backend

Sync User Profile Image on Discord and RealDevSquad V1 [RFC]

Open
#1,924 0 comments 0 reactions 1 assignee View on GitHub

@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 RealDevSquad or Discord, 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 the photo-verification object which can have the values of ACCEPTED, PENDING, and REJECTED, which will help in simplifying the querying of the objects based on their status. note - the status will turn to ACCEPTED only when both the profile.approved and discord.profile is approved.

User Flows

  1. 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_VERIFICATION only by SUPERUSER and then make the user profile changes.
    • Show all PHOTO_VERIFICATION on dashboard-site.
      • Will show current profile photo, new profile photo as well as the current discord profile photo.
      • Three options Approve, Reject & Refresh Discord Avatar

API Docs

  • /discord-actions/avatar/update/:discordId, this API will be responsible for updating the discord avatar URL in a PENDING status photo-verification object. Only for SUPERUSER.
  • /picture/all, this API will be responsible for querying all the current PENDING status photo-verification objects back. It can also accept username as a query parameter to filter. Only for SUPERUSER
  • /picture/:userId, will be responsible for querying all the current PENDING status photo-verification objects back for the userId provided. SUPERUSER can run this for any userId, while other users can only run for their own userId.

Dashboard

  • A basic UI for SUPERUSER to 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.