• Create organization handler

    Parameters

    • organizationService: Pick<OrganizationDataService, "createOrganization" | "getOrganization" | "normalizeOrganizationResponse">

      injected service use to handle the organization related operations

      • createOrganization
      • getOrganization
      • normalizeOrganizationResponse
    • hierarchyService: Pick<HierarchyDataService, "recalculateAncestors">

      injected service use to handle the hierarchy related operations

      • recalculateAncestors
    • shouldAutoApprove: boolean

      Should auto approve organization

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • body is required

    Returns Promise<adapter.AdapterHandlerResponse>

    201 Created

    • data: normalized organization response

    Description

    This handler will create organization by applying the following steps in sequence:

    1. Create organization

    2. Normalize organization response

    Throws

    500 NBError Internal Server Error

    • error when creating organization

Generated using TypeDoc