mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix more tests.
This commit is contained in:
parent
c99d7837a3
commit
33ec2de925
@ -53,7 +53,7 @@ public class AccountController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private LabelService labelService;
|
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)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changePassword(@RequestBody String password) throws PasswordTooLongException {
|
public void changePassword(@RequestBody String password) throws PasswordTooLongException {
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
@ -69,13 +69,13 @@ public class AccountController extends BaseController {
|
|||||||
userService.changePassword(user);
|
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() {
|
public RestUser fetchAccount() {
|
||||||
final User user = Utils.getUser(true);
|
final User user = Utils.getUser(true);
|
||||||
return new RestUser(user);
|
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)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeFirstname(@RequestBody String firstname) {
|
public void changeFirstname(@RequestBody String firstname) {
|
||||||
if (firstname == null) {
|
if (firstname == null) {
|
||||||
@ -87,7 +87,7 @@ public class AccountController extends BaseController {
|
|||||||
userService.updateUser(user);
|
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)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeLastName(@RequestBody String lastname) {
|
public void changeLastName(@RequestBody String lastname) {
|
||||||
if (lastname == null) {
|
if (lastname == null) {
|
||||||
@ -99,7 +99,7 @@ public class AccountController extends BaseController {
|
|||||||
userService.updateUser(user);
|
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)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeLanguage(@RequestBody String language) {
|
public void changeLanguage(@RequestBody String language) {
|
||||||
if (language == null) {
|
if (language == null) {
|
||||||
@ -112,8 +112,8 @@ public class AccountController extends BaseController {
|
|||||||
userService.updateUser(user);
|
userService.updateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = "account")
|
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
|
@RequestMapping(method = RequestMethod.DELETE, value = "/api/restfull/account")
|
||||||
public void deleteUser() throws WiseMappingException {
|
public void deleteUser() throws WiseMappingException {
|
||||||
// Delete collaborations ...
|
// Delete collaborations ...
|
||||||
final User user = Utils.getUser(true);
|
final User user = Utils.getUser(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user