Fix more tests.
parent
c99d7837a3
commit
33ec2de925
|
@ -53,7 +53,7 @@ public class AccountController extends BaseController {
|
|||
@Autowired
|
||||
private LabelService labelService;
|
||||
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/password", consumes = {"text/plain"})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/api/restfull/account/password", consumes = {"text/plain"})
|
||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||
public void changePassword(@RequestBody String password) throws PasswordTooLongException {
|
||||
if (password == null) {
|
||||
|
@ -69,13 +69,13 @@ public class AccountController extends BaseController {
|
|||
userService.changePassword(user);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/account", produces = {"application/json"})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/api/restfull/account", produces = {"application/json"})
|
||||
public RestUser fetchAccount() {
|
||||
final User user = Utils.getUser(true);
|
||||
return new RestUser(user);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/firstname", consumes = {"text/plain"})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/api/restfull/account/firstname", consumes = {"text/plain"})
|
||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||
public void changeFirstname(@RequestBody String firstname) {
|
||||
if (firstname == null) {
|
||||
|
@ -87,7 +87,7 @@ public class AccountController extends BaseController {
|
|||
userService.updateUser(user);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/lastname", consumes = {"text/plain"})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/api/restfull/account/lastname", consumes = {"text/plain"})
|
||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||
public void changeLastName(@RequestBody String lastname) {
|
||||
if (lastname == null) {
|
||||
|
@ -99,7 +99,7 @@ public class AccountController extends BaseController {
|
|||
userService.updateUser(user);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/locale", consumes = {"text/plain"})
|
||||
@RequestMapping(method = RequestMethod.PUT, value = "/api/restfull/account/locale", consumes = {"text/plain"})
|
||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||
public void changeLanguage(@RequestBody String language) {
|
||||
if (language == null) {
|
||||
|
@ -112,8 +112,8 @@ public class AccountController extends BaseController {
|
|||
userService.updateUser(user);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "account")
|
||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/api/restfull/account")
|
||||
public void deleteUser() throws WiseMappingException {
|
||||
// Delete collaborations ...
|
||||
final User user = Utils.getUser(true);
|
||||
|
|
Loading…
Reference in New Issue