• Delete organization review by user handler

    Parameters

    • reviewService: ReviewDataService

      injected service use to handle the review related operations

      • deleteReview
    • organizationApi: OrganizationDefaultAdapterAPI
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • params.reviewId is required

    Returns Promise<adapter.AdapterHandlerResponse>

    204 Status No Content

    Description

    This handler is used to delete organization review by user by applying the following steps in sequence:

    1. Get the reviewId from params

    2. Delete review where reviewId is reviewId (reviewService.deleteReview)

    3. Recalculate organization stats (organizationApi.updateOrganizationReviewStats) If an error occurs, it is logged and the process continues

    4. Return success

    Throws

    400 NBError Bad Request

    • reviewId is missing in request params

    Throws

    500 NBError Internal Server Error

    • delete review failed

Generated using TypeDoc