• Is organization exists validator

    Parameters

    • targetField: TargetField

      which field to get the orgId from context

    • organizationAPI: OrganizationDefaultAdapterAPI

      organization api

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<number>

    200 Status Ok

    Description

    This validator is used to check if the organization is exists by applying the following steps in sequence:

    1. Get the orgId from the context

    2. Check if the orgId is null

    3. Check if the organization is exists

    Throws

    400 NBError Wrong Parameter

    • orgId is null

    Throws

    404 NBError Not Found

    • organization is not exists

Generated using TypeDoc