Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/test/product/*', [
- getProduct(req, res, next), // populates req.locals.productResponse
- (req, res, next) => {
- req.locals.context['product-details-feature'].layout = 'product';
- if (req.locals.productResponse) {
- req.locals.context['product-details-feature'].partial = 'product-details-feature/main';
- next();
- } else {
- req.locals.context['product-details-feature'].partial = 'product-details-feature/product-not-found';
- res.sendStatus(500);
- }
- req.locals.context['product-details-feature'].uiBootstrap = JSON.stringify(Object.assign({ properties }, req.locals.productResponse || {}));
- }
- ]);
Add Comment
Please, Sign In to add comment