// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/service/VerifyUserService.java
// @Service
// @Transactional
// public class VerifyUserService {
// 
//     @Autowired
//     private UserRepository userRepository;
// 
//     public boolean verify(String key) {
//         Optional<User> confirmationKey = userRepository.findByConfirmationKey(key);
//         confirmationKey.ifPresent(User::confirmEmail);
//         return confirmationKey.isPresent();
//     }
// }


import org.nextrtc.examples.videochat_with_rest.service.VerifyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
package org.nextrtc.examples.videochat_with_rest.controller;


@RestController
@RequestMapping("/action/verify")
public class VerificationController {

    @Autowired
// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/service/VerifyUserService.java
// @Service
// @Transactional
// public class VerifyUserService {
// 
//     @Autowired
//     private UserRepository userRepository;
// 
//     public boolean verify(String key) {
//         Optional<User> confirmationKey = userRepository.findByConfirmationKey(key);
//         confirmationKey.ifPresent(User::confirmEmail);
//         return confirmationKey.isPresent();
//     }
// }


// Path: src/main/java/org/nextrtc/examples/videochat_with_rest/controller/VerificationController.java
import org.nextrtc.examples.videochat_with_rest.service.VerifyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

package org.nextrtc.examples.videochat_with_rest.controller;


@RestController
@RequestMapping("/action/verify")
public class VerificationController {

    @Autowired
    private VerifyUserService service;