Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sign in and sign up api #379

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

pranalidhanavade
Copy link
Contributor

  • Refactored following APIs:
  1. POST API /auth/signup Register new user to platform
  2. POST API/auth/signin Authenticate user for the access

What

  1. Implemented a well-defined interface by replacing previous existing Promise<object>.
  2. Ensured consistency of API status codes.
  3. Modified the NATS function.
  4. Tested with both positive and negative scenarios.

How

  1. Replaced the return type with a well-defined interface to enhance code clarity.
  2. Checked and standardized API status codes to ensure a uniform response.
  3. Modified the NATS function to accommodate the adjustments made in the API.

Why

  1. The implementation of a well-defined interface enhances code readability and makes the structure of the API response more explicit.
  2. Ensuring consistent API status codes improves communication between different components of the system and enhances overall reliability.

Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vivekayanworks vivekayanworks merged commit d7a4ef3 into nats-refactor Dec 27, 2023
2 checks passed
@vivekayanworks vivekayanworks deleted the refactor-sign-in-sign-up-api branch December 27, 2023 14:53
@pranalidhanavade pranalidhanavade linked an issue Dec 28, 2023 that may be closed by this pull request
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error handling for APIs of User, Auth modules
2 participants