RealDevSquad / RealDevSquad/website-backend

API to change users' discord nickname

Open
#1,119 2 comments 0 reactions 1 assignee View on GitHub

@bharati-21 is already working on this.

Since Aug 1, 2023.

backend feature task
Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

Create an API that can change the users' nicknames in the Real Dev Squad server.

Description
Create an API under the /discord-actions API which will call upon the endpoint exposed in cloudflare workers named: /guild/members

API contracts for the /guild/members
  • method: patch
  • authentication: JWT signed with rds-serverless-private-key
  • request body
{
    discordId: <Discord id is available in the user's data once they link their discord id>, (Remember `I` is capital in Id )
    userName: <rds username of the selected user also available in users' database>, (Remember `N` is capital in username)
}
Overview of the feature

Use case 1

  • users join in Real Dev Squad Server
  • Run the command /verify
  • come to my site
  • Accept terms and conditions
  • click on authorize
  • this will add a discord id in the users collection for the specific user
  • now once the discord id is added the name change API must be called automatically and change the nickname of the user in the server

Use case 2

  • users mark themselves OOO on my site
  • the API needs to be called automatically
  • set the nickname based on the standards defined (Will be defined in the near future)
Expectations
  • Follow TDD
  • Keep a minimum test coverage of 80%
  • Make sure API can not be called by users directly (Apart from superuser)
Need help? Try looking here;

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.