Real-Dev-Squad / website-backend

The backend code for all our website-related apps
https://api.realdevsquad.com/
MIT License
55 stars 258 forks source link

Add unverified role to db and remove on /verify #2257

Open shobhan-sundar-goutam opened 1 week ago

shobhan-sundar-goutam commented 1 week ago

Date: 19-11-2024

Developer Name: Shobhan Sundar Goutam


Issue Ticket Number

When a new user joins Discord, they are assigned an "Unverified" role/tag. However, this role is currently not stored in the database for tracking. The goal is to update the system so that this "Unverified" role is stored in the database as well. When a user completes the /verify command and authorizes themselves, the "Unverified" role should be removed from both the Discord and the database. Also respective logs are stored during this process.

Documentation Updated?

Under Feature Flag

Database Changes

Breaking Changes

Development Tested?

Screenshots

Screenshot 1 https://github.com/user-attachments/assets/6f029880-1e92-4063-9344-0103ea83b61b

Test Coverage

Screenshot 1 ![image](https://github.com/user-attachments/assets/6c3467bf-4d90-46c0-8332-4e66afc4c8e4) ![image](https://github.com/user-attachments/assets/7f618672-0b4d-44e3-b752-2b9edc58c03b) ![image](https://github.com/user-attachments/assets/1683c15b-3a49-4fed-8b76-941ac310e7a5) ![image](https://github.com/user-attachments/assets/07a38fb4-c7a0-4cbf-8718-82030e5aa56d)
pankajjs commented 6 days ago

Left few comments @shobhan-sundar-goutam

pankajjs commented 5 days ago
shobhan-sundar-goutam commented 5 days ago
  • Test is failing
  • Why not under feature flag? @shobhan-sundar-goutam

Build is failing and it very weird for me. Not done anything that will make the build fail especially in the second commit.

Not under feature flag because each parts are either getting triggered from frontend, discord slash command or cron-job. So putting under feature flag would require handling feature flags in the respective places from where the apis are getting called and these are already getting used in production which will result in breaking the entire flow. Also staging and prod test will become a big issue in that case.