-
Notifications
You must be signed in to change notification settings - Fork 16
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: Api response #345
Conversation
Signed-off-by: Moulika Kulkarni <moulika.kulkarni@ayanworks.com>
@MoulikaKulkarni Please look into these sonar cloud issues once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check comment
Signed-off-by: Moulika Kulkarni <moulika.kulkarni@ayanworks.com>
Signed-off-by: Moulika Kulkarni <moulika.kulkarni@ayanworks.com>
I have resolved the comment. Kindly check. |
@@ -51,12 +56,12 @@ export class OrganizationService extends BaseService { | |||
* @param | |||
* @returns Public organizations list | |||
*/ | |||
async getPublicOrganizations(getAllOrgsDto: GetAllOrganizationsDto): Promise<{ response: object }> { | |||
async getPublicOrganizations(getAllOrgsDto: GetAllOrganizationsDto): Promise<{ response: GetOrgs }> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not have an object key "response" outside the interface. This should be a part of Response interface. Please update this at multiple places in this PR.
@@ -195,7 +196,7 @@ export class OrganizationService { | |||
throw new NotFoundException(ResponseMessages.organisation.error.profileNotFound); | |||
} | |||
|
|||
const credentials = await this.organizationRepository.getCredDefByOrg(organizationDetails['id']); | |||
const credentials = await this.organizationRepository.getCredDefByOrg(organizationDetails.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use meaningful names for variables. In this case, instead of "credentials" it should be "credDefs".
apps/user/src/user.controller.ts
Outdated
@@ -103,7 +103,7 @@ export class UserController { | |||
* @returns organization users list | |||
*/ | |||
@MessagePattern({ cmd: 'fetch-organization-user' }) | |||
async getOrganizationUsers(payload: { orgId: string, pageNumber: number, pageSize: number, search: string }): Promise<object> { | |||
async getOrganizationUsers(payload: { orgId: string, pageNumber: number, pageSize: number, search: string }): Promise<OrgUsers> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This payload should be referring to one interface instead of adding an object.
@@ -0,0 +1,9 @@ | |||
export interface IOrgRoles { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's maintain naming convention for interfaces across the platform.
Signed-off-by: Moulika Kulkarni <moulika.kulkarni@ayanworks.com>
Signed-off-by: Moulika Kulkarni <moulika.kulkarni@ayanworks.com>
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
WHAT
WHY
APIs in the Organization Module: