This commit is contained in:
Le Deng
2017-03-10 17:32:55 -05:00
parent 0c37fb08c1
commit eee2c66ecf
7 changed files with 79 additions and 22 deletions

View File

@@ -47,6 +47,16 @@ public class ShippingResource {
return new ResponseEntity("Shipping Added(Updated) Successfully!", HttpStatus.OK);
}
@RequestMapping(value = "/getUserShippingList")
public List<UserShipping> getUserShippingList(
Principal principal) {
User user = userService.findByUsername(principal.getName());
List<UserShipping> userShippingList = user.getUserShippingList();
return userShippingList;
}
@RequestMapping(value = "/remove", method = RequestMethod.POST)
public ResponseEntity removeUserShippingPost(
@RequestBody String id,