• Does topic exist validator

    Parameters

    • chatService: ChatDataService

      injected service use to handle the chat related operations

      • getOneTopic
    • targetField: TargetField

      which field to get the topic 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 topic exists by applying the following steps in sequence:

    1. Get topic by id (chatService.getOneTopic)

    2. Check if the topic exists

    Throws

    404 NBError Not Found

    • topic not found

Generated using TypeDoc