| Line 362... |
Line 362... |
| 362 |
@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)
|
| 363 |
public ResponseEntity<?> getBrandsToDisplay() {
|
363 |
public ResponseEntity<?> getBrandsToDisplay() {
|
| 364 |
return new ResponseEntity<>(mongoClient.getBrandsToDisplay(), HttpStatus.OK);
|
364 |
return new ResponseEntity<>(mongoClient.getBrandsToDisplay(), HttpStatus.OK);
|
| 365 |
}
|
365 |
}
|
| 366 |
|
366 |
|
| - |
|
367 |
@ApiImplicitParams({
|
| - |
|
368 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 367 |
@RequestMapping(value = "/deals/skus/{skus}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
369 |
@RequestMapping(value = "/deals/skus/{skus}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 368 |
public ResponseEntity<?> getDealsBySkus(@PathVariable String skus) throws Throwable {
|
370 |
public ResponseEntity<?> getDealsBySkus(@PathVariable String skus) throws Throwable {
|
| 369 |
StringBuffer sb = new StringBuffer("/getDealsForNotification/");
|
371 |
StringBuffer sb = new StringBuffer("/getDealsForNotification/");
|
| 370 |
String uri = sb.append(skus).toString();
|
372 |
String uri = sb.append(skus).toString();
|
| 371 |
RestClient rc = new RestClient(SchemeType.HTTP, host, port);
|
373 |
RestClient rc = new RestClient(SchemeType.HTTP, host, port);
|
| 372 |
String response = rc.get(uri, new HashMap<>());
|
374 |
String response = rc.get(uri, new HashMap<>());
|
| 373 |
JsonObject result_json = Json.parse(response).asObject();
|
375 |
JsonArray result_json = Json.parse(response).asArray();
|
| 374 |
return new ResponseEntity<>(result_json, HttpStatus.OK);
|
376 |
return new ResponseEntity<>(result_json, HttpStatus.OK);
|
| 375 |
}
|
377 |
}
|
| 376 |
|
378 |
|
| 377 |
}
|
379 |
}
|