• Update organization handler

    Parameters

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

      injected service use to handle the organization related operations

      • getOrganization
      • updateOrganization
    • hierarchyService: Pick<HierarchyDataService, "recalculateAncestors" | "recalculateDescendants">

      injected service use to handle the hierarchy related operations

      • recalculateAncestors
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • params is required

    Returns Promise<adapter.AdapterHandlerResponse>

    200 OK

    • data: normalized organization response

    Description

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

    1. Read organization (service.getOrganization)

    2. Update organization (service.updateOrganization)

    3. Read organization (service.getOrganization)

    4. Normalize organization response (normalizeOrganizationResponse)

    5. Return normalized organization response

    Throws

    Error

    • params is missing from context

    Throws

    500 NBError Internal Server Error

    • error when reading organization
    • error when updating organization

Generated using TypeDoc