• Performs checks on the organization to ensure it has no children

    Parameters

    • organizationDataService: Pick<OrganizationDataService, "getOrganization">

      injected service use to handle the organization related operations

    • targetField: TargetField

      the target field for the organization id

    • throwNotImplemented: boolean

      whether to throw a 501 not implemented error if the organization has children

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<StatusCodes>

    200 Status OK

    Description

    Performs the following checks:

    • If targetField is null/undefined, pass
    • Load organization. If not present, pass
    • Check if organization has children (childrenCount > 0)
    • If organization has children, throw 400 bad request
    • If organization has no children, pass

Generated using TypeDoc