• Patch topic handler

    Parameters

    • chatService: ChatDataService

      injected service use to handle the chat related operations

      • updateOneTopic
      • getOneTopicAndNormalize
    • authSecrets: AuthSecrets

      injected auth secrets used to handle the authentication

    • authenticate: AuthenticationFunction
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • params.id is required

    Returns Promise<adapter.AdapterHandlerResponse>

    200 Status OK

    Description

    This handler will patch topic by applying the following steps in sequence:

    1. Authenticate the request (authenticate)

    2. Patch topic (chatService.updateOneTopic)

    3. Normalize topic (chatService.getOneTopicAndNormalize)

    4. Return normalized topic

    Throws

    400 NBError Bad Request

    • topic id not found

    Throws

    404 NBError Not Found

    • topic not found for Id: ${topicId}

    Throws

    500 NBError Internal Server Error

    • params is missing

Generated using TypeDoc