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.

27 lines (24 loc) 919 B
import logger from '../../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.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); } } export { ProductCollectionService }; //# sourceMappingURL=productCollectionService.js.map