UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

29 lines (25 loc) 969 B
'use strict'; var logger = require('../../utils/logger.js'); class ProductCollectionService { productCollectionClient; enabled; constructor(productCollectionClient, serviceFeatureConfig) { this.productCollectionClient = productCollectionClient; this.productCollectionClient = productCollectionClient; this.enabled = Boolean(serviceFeatureConfig.collections); if (!this.enabled) logger.default.info(`Product collections: disabled `); } async getProductCollections(token) { if (!this.enabled) return []; return this.productCollectionClient.getProductCollections(token); } async getProductCollection(token, id) { if (!this.enabled) return undefined; return this.productCollectionClient.getProductCollection(token, id); } } exports.ProductCollectionService = ProductCollectionService; //# sourceMappingURL=productCollectionService.js.map