Skip to content

Commit

Permalink
linting users
Browse files Browse the repository at this point in the history
Signed-off-by: NishantSinghhhhh <[email protected]>
  • Loading branch information
NishantSinghhhhh committed Dec 30, 2024
1 parent 9b837fa commit 0d2f42d
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions tests/resolvers/User/userAccess.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,35 @@ vi.mock("../../../src/models/FundraisingCampaignPledge", () => ({
},
}));

type AdditionalUserFields = {
createdAt?: Date;
updatedAt?: Date;
isAdmin?: boolean;
isSuperAdmin?: boolean;
blocked?: boolean;
role?: string;
userType?: string;
appLanguageCode?: string;
pluginCreationAllowed?: boolean;
adminApproved?: boolean;
adminFor?: mongoose.Types.ObjectId[];
memberOf?: mongoose.Types.ObjectId[];
createdOrganizations?: mongoose.Types.ObjectId[];
joinedOrganizations?: mongoose.Types.ObjectId[];
registeredEvents?: mongoose.Types.ObjectId[];
eventAdmin?: mongoose.Types.ObjectId[];
createdEvents?: mongoose.Types.ObjectId[];
tokenVersion?: number;
};

type UserType = {
_id: mongoose.Types.ObjectId;
email: string;
firstName?: string;
lastName?: string;
image?: string | null;
organizationsBlockedBy: string[];
[key: string]: any;
};
} & AdditionalUserFields;

type ResolverReturnType = {
user: UserType;
Expand Down

0 comments on commit 0d2f42d

Please sign in to comment.