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: User module APIs. #386

Merged
merged 8 commits into from
Dec 28, 2023

Conversation

pranalidhanavade
Copy link
Contributor

@pranalidhanavade pranalidhanavade commented Dec 28, 2023

  • Refactored following APIs:
  1. GET /users/platform-settings Get all platform and ecosystem settings.
  2. PUT /users/platform-settings Update platform and ecosystem settings.
  3. GET /users/user-credentials Get user credentials by Id.
  4. GET /users/org-invitations Organization invitations
  5. POST /users/certificate Share user certificate

What

  1. Ensured consistency of API status codes.
  2. Modified the NATS function.
  3. Tested with both positive and negative scenarios.

How

  1. Checked and standardized API status codes to ensure a uniform response.
  2. Modified the NATS function to accommodate the adjustments made in the API.

Why

  1. Ensuring consistent API status codes improves communication between different components of the system and enhances overall reliability.

Extra points

  • Implementation of well-defined interface by replacing previous existing Promise is remaining for this APIs.

@@ -18,7 +18,8 @@ export const ResponseMessages = {
userCredentials: 'User credentials fetched successfully',
platformEcosystemettings: 'Platform and ecosystem settings updated',
fetchPlatformSettings: 'Platform settings fetched',
signUpUser:'User created successfully'
signUpUser:'User created successfully',
shareUserCertificate:'Certificate url generated successfully'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL should be in capital letters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

@@ -113,10 +113,10 @@ export interface ISendVerificationEmail {
}

export interface ICheckUserDetails {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reduce no. of fields as discussed earlier?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sir.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

@pranalidhanavade pranalidhanavade linked an issue Dec 28, 2023 that may be closed by this pull request
14 tasks
@pranalidhanavade pranalidhanavade changed the title refactor: User ecosystem settings and share user credentials APIs. refactor: User platform settings and share user credentials APIs. Dec 28, 2023
@pranalidhanavade pranalidhanavade changed the title refactor: User platform settings and share user credentials APIs. refactor: User module APIs. Dec 28, 2023
Copy link

sonarcloud bot commented Dec 28, 2023

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 c8bff2e into nats-refactor Dec 28, 2023
2 checks passed
@vivekayanworks vivekayanworks deleted the refactor-user-org-invitation-api branch December 28, 2023 14:53
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