• Is normal status organization validator

    Parameters

    • organizationService: OrganizationDataService

      injected service use to handle the organization related operations

    • orgIdField: TargetField

      which field to get the orgId from context

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • params is required

    Returns Promise<number>

    200 Status OK

    Description

    This validator will check if the organization status is normal by applying the following steps in sequence:

    1. Get orgId from context

    2. Check if orgId exists

    3. Check if the organization status is normal

    Throws

    400 NBError Bad Request

    • missing orgId in params

    Throws

    403 NBError Forbidden

    • organization status is restricted or forbidden

    Throws

    404 NBError Not Found

    • organizationId is not found in ${orgIdField.type}.${orgIdField.name}
    • Organization ${orgId} cannot be found.

Generated using TypeDoc