• Get user role handler

    Parameters

    • service: Pick<OrgUserDataService, "getUserOrganizationRole">

      injected service use to handle the organization related operations

      • getUserOrganizationRole
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query]. Note:

      • params is required
      • params.userId is required
      • params.orgId is required

    Returns Promise<adapter.AdapterHandlerResponse>

    200 OK

    • data: { role: string }

    Description

    This handler will get user role by applying the following steps in sequence:

    1. Get organization id and user id from params

    2. Get user organization role (service.getUserOrganizationRole)

    3. Return user role

    Throws

    Error

    • params not exist
    • userId not exist
    • orgId not exist

    Throws

    404 NBError Not Found

    • user role is missing in the organization

Generated using TypeDoc