Class UserSettingsController
java.lang.Object
io.github.navjotsrakhra.eventmanager.controller.UserSettingsController
@RestController
@RequestMapping("/settings/user")
public class UserSettingsController
extends Object
The UserSettingsController class handles HTTP requests related to user settings.
-
Constructor Summary
ConstructorsConstructorDescriptionUserSettingsController(UserSettingsService userSettingsService) Constructor for the UserSettingsController class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?> changePassword(String newPassword, Principal principal) Handles POST requests for the "/settings/user/password" URL to change the user's password.
-
Constructor Details
-
Method Details
-
changePassword
@PostMapping("/password") public org.springframework.http.ResponseEntity<?> changePassword(@RequestBody String newPassword, Principal principal) Handles POST requests for the "/settings/user/password" URL to change the user's password.- Parameters:
newPassword- The new password as a String.principal- Represents the currently authenticated user.- Returns:
- ResponseEntity indicating the result of the password change operation.
-