| Line 492... |
Line 492... |
| 492 |
|
492 |
|
| 493 |
@RequestMapping(value = "/fofo/brands", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
493 |
@RequestMapping(value = "/fofo/brands", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 494 |
public ResponseEntity<?> getBrandsToDisplay(HttpServletRequest request, @RequestParam(required = false, defaultValue = "0") int categoryId) throws Exception {
|
494 |
public ResponseEntity<?> getBrandsToDisplay(HttpServletRequest request, @RequestParam(required = false, defaultValue = "0") int categoryId) throws Exception {
|
| 495 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
495 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 496 |
logger.info("userInfo [{}]", userInfo);
|
496 |
logger.info("userInfo [{}]", userInfo);
|
| - |
|
497 |
List<BrandCatalog> brandsDisplay = brandsService.getBrandsToDisplay(categoryId);
|
| 497 |
List<DBObject> brandsDisplay = mongoClient.getMongoBrands(userInfo.getRetailerId(), userInfo.getEmail(), categoryId);
|
498 |
//List<DBObject> brandsDisplay = mongoClient.getMongoBrands(userInfo.getRetailerId(), userInfo.getEmail(), categoryId);
|
| 498 |
return new ResponseEntity<>(brandsDisplay, HttpStatus.OK);
|
499 |
return new ResponseEntity<>(brandsDisplay, HttpStatus.OK);
|
| 499 |
}
|
500 |
}
|
| 500 |
|
501 |
|
| 501 |
@RequestMapping(value = "/fofo/brandCatalog", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
502 |
@RequestMapping(value = "/fofo/brandCatalog", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 502 |
public ResponseEntity<?> getBrands(HttpServletRequest request, @RequestParam(required = false, defaultValue = "0") int categoryId) throws Exception {
|
503 |
public ResponseEntity<?> getBrands(HttpServletRequest request, @RequestParam(required = false, defaultValue = "0") int categoryId) throws Exception {
|