use of org.entando.entando.aps.system.services.usersettings.model.UserSettingsDto in project entando-core by entando.
the class UserSettingsController method getUserSettings.
@RestAccessControl(permission = Permission.SUPERUSER)
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<RestResponse> getUserSettings() {
logger.debug("loading user settings");
UserSettingsDto userSettings = this.getUserSettingsService().getUserSettings();
return new ResponseEntity<>(new RestResponse(userSettings), HttpStatus.OK);
}
use of org.entando.entando.aps.system.services.usersettings.model.UserSettingsDto in project entando-core by entando.
the class UserSettingsController method updateUserSettings.
@RestAccessControl(permission = Permission.SUPERUSER)
@RequestMapping(method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<RestResponse> updateUserSettings(@Valid @RequestBody UserSettingsRequest request, BindingResult bindingResult) {
logger.debug("updatinug user settings");
// params validations
if (bindingResult.hasErrors()) {
throw new ValidationGenericException(bindingResult);
}
UserSettingsDto settings = this.getUserSettingsService().updateUserSettings(request);
return new ResponseEntity<>(new RestResponse(settings), HttpStatus.OK);
}
Aggregations