• Create Location Handler

    Parameters

    • locationService: Pick<LocationDataService, "createLocation" | "getLocation" | "normalizeLocationResponse">

      injected service use to handle the location related operations

    • 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: location

    Description

    This handler is used to create a location by applying the following steps in sequence:

    1. Create the location (locationService.createLocation)

    2. Get the location (locationService.getLocation)

    3. Return the location (locationService.normalizeLocationResponse)

    Throws

    500 NBError Internal Server Error

    • create location failed

Generated using TypeDoc