@RequestMapping(value = "/update", method = RequestMethod.POST)
	public @ResponseBody
	void update(
			@RequestParam(value = "username", required = true) String username,
			@RequestParam(value = "name", required = false) String name,
			@RequestParam(value = "surname", required = false) String surname,
			@RequestParam(value = "telephoneNumber", required = false) String telephoneNumber) {
		logger.debug("Received request to update account");

		accountService.update(new Account(username, name, surname,
				telephoneNumber));

	}
@ RequestMapping ( value = "/update" , method = RequestMethod . POST ) public @ ResponseBody void update ( @ RequestParam ( value = "username" , required = true ) String username , @ RequestParam ( value = "name" , required = false ) String name , @ RequestParam ( value = "surname" , required = false ) String surname , @ RequestParam ( value = "telephoneNumber" , required = false ) String telephoneNumber ) { logger . debug ( "Received request to update account" ) ; accountService . update ( new Account ( username , name , surname , telephoneNumber ) ) ; }
Handles request for saving / updating account