| Line 76... |
Line 76... |
| 76 |
private UserAccountRepository userAccountRepository;
|
76 |
private UserAccountRepository userAccountRepository;
|
| 77 |
|
77 |
|
| 78 |
@Autowired
|
78 |
@Autowired
|
| 79 |
ResponseSender<?> responseSender;
|
79 |
ResponseSender<?> responseSender;
|
| 80 |
|
80 |
|
| - |
|
81 |
|
| 81 |
List<String> filterableParams = Arrays.asList("brand");
|
82 |
List<String> filterableParams = Arrays.asList("brand");
|
| 82 |
|
83 |
|
| 83 |
@RequestMapping(value = ProfitMandiConstants.URL_DEALS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
84 |
@RequestMapping(value = ProfitMandiConstants.URL_DEALS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 84 |
@ApiImplicitParams({
|
85 |
@ApiImplicitParams({
|
| 85 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
86 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| Line 360... |
Line 361... |
| 360 |
|
361 |
|
| 361 |
@RequestMapping(value = "/fofo/brands", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
362 |
@RequestMapping(value = "/fofo/brands", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 362 |
public ResponseEntity<?> getBrandsToDisplay() {
|
363 |
public ResponseEntity<?> getBrandsToDisplay() {
|
| 363 |
return new ResponseEntity<>(mongoClient.getBrandsToDisplay(), HttpStatus.OK);
|
364 |
return new ResponseEntity<>(mongoClient.getBrandsToDisplay(), HttpStatus.OK);
|
| 364 |
}
|
365 |
}
|
| - |
|
366 |
|
| - |
|
367 |
@RequestMapping(value = "/deals/skus/{skus}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| - |
|
368 |
public ResponseEntity<?> getDealsBySkus(@PathVariable String skus) throws Throwable {
|
| - |
|
369 |
StringBuffer sb = new StringBuffer("/getDealsForNotification/");
|
| - |
|
370 |
String uri = sb.append(skus).toString();
|
| - |
|
371 |
RestClient rc = new RestClient(SchemeType.HTTP, host, port);
|
| - |
|
372 |
String response = rc.get(uri, new HashMap<>());
|
| - |
|
373 |
JsonObject result_json = Json.parse(response).asObject();
|
| - |
|
374 |
return new ResponseEntity<>(result_json, HttpStatus.OK);
|
| - |
|
375 |
}
|
| 365 |
|
376 |
|
| 366 |
}
|
377 |
}
|