• Does message exist validator

    Parameters

    • chatService: ChatDataService

      injected service use to handle the chat related operations

      • getOneMessage
    • targetField: TargetField

      which field to get the message id from

    • 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 checks if the message exists by applying the following steps in sequence:

    1. Get message by id (chatService.getOneMessage)

    2. Check if the message exists

    Throws

    404 NBError Not Found

    • message not found

Generated using TypeDoc