RealDevSquad / RealDevSquad/website-backend

Parent Ticket to refactor few issues in backend

Open
#1,014 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Issues

  • #1015

    • The online Auctions API validator only checks if the item type in the body is a string.
    • When I tried calling the API, it failed.
    • The item type should be an available currency, such as "DINERO" or "NEELAM".
    • The quantity cannot exceed what you own.
    • This can cause issues for users unaware of these requirements.
    • It is important to update the validator to reflect these requirements and prevent future errors accurately.
    • Please fix this in the validator to improve user experience.
  • #1016

    • The Badges API works with form-data instead of raw JSON.
    • This is inconsistent with other APIs.
    • This inconsistency can cause confusion for developers.
    • Developers are used to working with raw JSON in other APIs.
    • It is important to have consistency in the API design.
    • Consistency improves the developer experience and reduces errors.
  • #1017

    • There is no middleware validator present for the /challenges/subscribe API.
    • This can cause security issues.
    • It allows users to send any data to this endpoint.
    • Without a middleware validator, there is no way to ensure data validity and security.
    • This can lead to potential vulnerabilities and exploits.
    • It is important to implement a middleware validator to prevent these security issues.
  • #1018

    • The name of the API used to make a user a member and archive them is not properly named with nouns.
    • These APIs do not return any response.
    • They should be fixed to return a proper response.
    • Having a properly named API with nouns can improve clarity and understanding for developers.
    • It is important for APIs to return a proper response.
    • This provides feedback and confirmation to the user.
    • It can improve the user experience and reduce confusion.
  • #1019

    • The /stocks API response has two keys: message and stocks.
    • The message key returns a response such as success or failure.
    • The stocks key is an array of all the stocks.
    • The stocks key should be changed to data.
    • Changing the stocks key to data can improve clarity and consistency.
    • Rename the /stocks/users/self to /stocks/self
    • There is no API for buying and selling stocks.
    • You can only create stocks and get a list of all the stocks that have been created.
    • The lack of an API for buying and selling stocks can limit functionality and usefulness.
    • It is important to have APIs that support core features and actions.
    • Implementing APIs for buying and selling stocks can improve the user experience.
    • This provides more options for users.

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.

Research direction

Start by reviewing the linked child issues #1015 through #1019 and the backend API entry points they identify. Confirm the scope and dependencies for each unchecked item, including validation, request format, responses, naming, and stock operations. Done means the remaining child issues are resolved and their API behavior matches the stated requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.