talawa-api / Exports / utilities/adminCheck
▸ adminCheck(userId
, organization
): Promise
<void
>
If the current user is an admin of the organisation, this function returns true
otherwise it returns false
.
Name | Type | Description |
---|---|---|
userId |
string | ObjectId |
Current user id. |
organization |
InterfaceOrganization |
Organization data of InterfaceOrganization type. |
Promise
<void
>
True
or False
.
Remarks
This is a utility method.