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 Details

    • UserSettingsController

      public UserSettingsController(UserSettingsService userSettingsService)
      Constructor for the UserSettingsController class.
      Parameters:
      userSettingsService - Service for user settings.
  • 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.