• Is admin message template validator

    Parameters

    • chatService: ChatDataService

      injected service use to handle the chat related operations

      • getMessageTemplateByIdAndNormalize
    • targetField: TargetField

      which field to get the message template 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 template is admin message template by applying the following steps in sequence:

    1. Get message template by id and normalize (chatService.getMessageTemplateByIdAndNormalize)

    2. Check if the message template exists

    3. Check if the message template is admin message template

    Throws

    403 NBError Forbidden

    • message template is not admin message template

    Throws

    404 NBError Not Found

    • message template not found

Generated using TypeDoc