• Create subscription handler

    Parameters

    • notificationService: NotificationDataService

      injected service use to handle the notification related operations

      • createSubscription
      • getOneSubscriptionAndNormalize
    • 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: subscription

    Description

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

    1. Create subscription (notificationService.createSubscription)

    2. Get subscription by id and normalize (notificationService.getOneSubscriptionAndNormalize)

    3. Return the subscription

    Throws

    500 NBError Internal Server Error

    • create subscription failed

Generated using TypeDoc