• Create topic handler

    Parameters

    • notificationService: NotificationDataService

      injected service use to handle the notification related operations

      • createTopic
      • getOneTopicAndNormalize
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<adapter.AdapterHandlerResponse>

    201 Status Created

    • data: topic

    Description

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

    1. Create topic (notificationService.createTopic)

    2. Get topic by id and normalize (notificationService.getOneTopicAndNormalize)

    3. Return the topic

    Throws

    500 NBError Internal Server Error

    • create topic failed

Generated using TypeDoc