Skip to content

Commit

Permalink
Fixed linting and Removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
rishav-jha-mech committed Oct 19, 2023
1 parent 6996ca7 commit f45a528
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
6 changes: 0 additions & 6 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ export const ADMIN_CHANGING_ROLE_OF_CREATOR = {
PARAM: "admin.changeRoleOfCreator",
};

export const ADMIN_CHANGING_ROLE_OF_ADMIN = {
MESSAGE: "Error: Current admin cannot change the role of another admin",
CODE: "admin.changeRoleOfAdmin",
PARAM: "admin.changeRoleOfAdmin",
};

export const ADMIN_CANNOT_CHANGE_ITS_ROLE = {
MESSAGE: "Error: Current admin cannot change its own role",
CODE: "admin.changeOwnRole",
Expand Down
4 changes: 1 addition & 3 deletions src/resolvers/Mutation/updateUserRoleInOrganization.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { Types } from "mongoose";
import {
ADMIN_CANNOT_CHANGE_ITS_ROLE,
ADMIN_CHANGING_ROLE_OF_ADMIN,
ADMIN_CHANGING_ROLE_OF_CREATOR,
ADMIN_REMOVING_CREATOR,
ORGANIZATION_NOT_FOUND_ERROR,
USER_NOT_AUTHORIZED_ADMIN,
USER_NOT_FOUND_ERROR,
USER_NOT_MEMBER_FOR_ORGANIZATION,
} from "../../constants";
import { errors, requestContext } from "../../libraries";
import { InterfaceOrganization, Organization, User } from "../../models";
import { Organization, User } from "../../models";
import type { MutationResolvers } from "../../types/generatedGraphQLTypes";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
} from "vitest";
import {
ADMIN_CANNOT_CHANGE_ITS_ROLE,
ADMIN_CHANGING_ROLE_OF_ADMIN,
ADMIN_CHANGING_ROLE_OF_CREATOR,
ORGANIZATION_NOT_FOUND_ERROR,
USER_NOT_AUTHORIZED_ADMIN,
Expand Down

0 comments on commit f45a528

Please sign in to comment.