Skip to main content

generateUserData

talawa-api


talawa-api / utilities/createSampleOrganizationUtil / generateUserData

Function: generateUserData()

> generateUserData(organizationId, userType): Promise<{ appUserProfile: Document<unknown, {}, InterfaceAppUserProfile> & InterfaceAppUserProfile & Required<{ _id: ObjectId; }>; user: Document<unknown, {}, InterfaceUser> & InterfaceUser & Required<{ _id: ObjectId; }>; }>

Generates user data for a given organization and user type.

Parameters

organizationId

string

The ID of the organization the user belongs to

userType

string

The type of the user ('ADMIN' or 'USER')

Returns

Promise<{ appUserProfile: Document<unknown, {}, InterfaceAppUserProfile> & InterfaceAppUserProfile & Required<{ _id: ObjectId; }>; user: Document<unknown, {}, InterfaceUser> & InterfaceUser & Required<{ _id: ObjectId; }>; }>

A promise that resolves to an object containing the created user and their application profile

Defined in

src/utilities/createSampleOrganizationUtil.ts:24