Esempio n. 1
0
  @RequestMapping(value = "/action/cards", method = RequestMethod.POST)
  public @ResponseBody Card postNewCard(@RequestBody Card request) {

    System.out.println("POST: Responing with new card");
    request.setId(CardFactory.nextId());
    System.out.println(request.toString());

    cardService.addCard(request);
    return request;
  }
Esempio n. 2
0
  @RequestMapping(value = "/action/cards/{id}", method = RequestMethod.PUT)
  public @ResponseBody Card geoCodeV1(@RequestBody Card card, @PathVariable Integer id) {

    System.out.println("PUT: Responding with updated card ");
    System.out.println(card.toString());
    cardService.updateCard(card, id);

    return card;
  }