• Does owner attachment exist validator

    Parameters

    • attachmentService: AttachmentService

      attachment service

    • 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 attachment exists for the organization by applying the following steps in sequence:

    1. Get the orgId and attachmentId from the context

    2. Check if the orgId or attachmentId is missing

    3. Check if the attachment exists for the organization

    Throws

    400 NBError Bad Request

    • orgId or attachmentId not exist in request params

    Throws

    404 NBError Not Found

    • attachment not found for organization

Generated using TypeDoc