src/main/java/edu/kea/kab/controller/MainController.java
@PostMapping("/adduser")
    public String addUser(User user) {
        userService.addUser(user);

        String session = RequestContextHolder.currentRequestAttributes().getSessionId();

        consumptionService.connectUserWithSession(user, session);

        return "/login";
    }
// add a new user to the users table
add a new user to the users table
add a new user to the users table
@PostMapping("/adduser")
    public String addUser(User user) {
        userService.addUser(user);
        String session = RequestContextHolder.currentRequestAttributes().getSessionId();
        consumptionService.connectUserWithSession(user, session);
        return "/login";
    }
@ PostMapping ( "/adduser" ) public String addUser ( User user ) { userService . addUser ( user ) ; String session = RequestContextHolder . currentRequestAttributes ( ) . getSessionId ( ) ; consumptionService . connectUserWithSession ( user , session ) ; return "/login" ; }
add a new user to the users table
add a new user to the users table