• Does org attachment exist validator

    Parameters

    • attachmentService: AttachmentService

      injected service use to handle the attachment related operations

    • orgIdField: TargetField

      which field to get the orgId from context

    • attachmentIdField: TargetField

      which field to get the attachmentId from context

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<number>

    200 Status OK

    • organization attachment exists

    Description

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

    1. Get orgId and attachmentId from context

    2. Check if orgId and attachmentId exist

    3. Check if the org attachment exists

    Throws

    400 NBError Bad Request

    • missing orgId or attachmentId in params

    Throws

    404 NBError Not Found

    • organization attachment not found

Generated using TypeDoc