stack icon indicating copy to clipboard operation
stack copied to clipboard

Bug: Improper Handling of Request Body Parameters in User and Team Creation APIs

Open kfahad5607 opened this issue 1 year ago • 3 comments

I have identified a few issues with the server APIs. Some APIs are accepting data in the request body that is not being used in the route handlers.

Issues with following APIs

1. Create User

  • Issue: When creating a new user, the API accepts selected_team_id, but the route handler does not make use of selected_team_id.
  • Untitled design (1)

2. Create a Team

  • Issue: When creating a new team, the API accepts profile_image_url, but the route handler does not add the profile_image_url to the newly created team.
  • Untitled design

Probable Solutions

1. Create User

  • Solution 1: Do not accept selected_team_id at all, as it does not make sense to ask for a team ID when the membership does not exist.
  • Solution 2: Create the membership between the newly created user and selected_team_id, then make the team the selected team.

2. Create a Team

  • Solution: Pass profile_image_url while creating the new team.

Additional Notes:

I would love to work on this issue. Please assign it to me if possible.

kfahad5607 avatar Aug 05 '24 17:08 kfahad5607

Sorry somehow missed this issue, you can work on it if you are still interested

fomalhautb avatar Aug 21 '24 02:08 fomalhautb

Yes. I am interested. Thank you.

kfahad5607 avatar Aug 21 '24 19:08 kfahad5607

You can join our discord and ask me directly if you have any question or need any help

fomalhautb avatar Aug 21 '24 19:08 fomalhautb

I have already joined the discord. I will reach out if I need anything help.

kfahad5607 avatar Aug 22 '24 16:08 kfahad5607

@fomalhautb if @kfahad5607 is not working on it, i can work on this

dev13-suthar avatar Sep 10 '24 04:09 dev13-suthar

Hi @dev13-suthar. Sorry to keep this fix hanging. I was busy at work but I will be creating a PR for it.

kfahad5607 avatar Sep 11 '24 19:09 kfahad5607