• Is organization exist validator

    Parameters

    • isOrganizationExistChecker: ((orgId) => Promise<boolean>)

      injected function use to check if the organization exists

        • (orgId): Promise<boolean>
        • Parameters

          • orgId: string

          Returns Promise<boolean>

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<StatusCodes>

    200 Status OK

    Description

    This validator will check if the organization exists by applying the following steps in sequence:

    1. Get orgId from context

    2. Check if orgId exists

    3. Check if the organization exists

    Throws

    Error

    • params not set

    Throws

    400 NBError Bad Request

    • missing orgId in params

    Throws

    404 NBError Not Found

    • organization with id ${params?.orgId} not found in the system

Generated using TypeDoc