• Get category product count handler

    Parameters

    • productStatisticsService: Pick<ProductStatisticsDataService, "getCategoryProductCount">

      injected service use to handle the category related operations

      • getCategoryProductCount
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

      • query.categoryIds is required

    Returns Promise<adapter.AdapterHandlerResponse>

    200 Status Ok

    • data: category

    Description

    This handler is used to get a category product count by applying the following steps in sequence:

    1. Get the categoryIds from params

    2. Get the category (productStatisticsService.getCategoryProductCount)

    3. Return the categoryCountResult

    Throws

    404 NBError Not Found

    • missing categoryIds

Generated using TypeDoc