package edu.whut.smilepicturebackend.controller;
import edu.whut.smilepicturebackend.common.BaseResponse;
import edu.whut.smilepicturebackend.common.ResultUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class MainController {

    /**
     * 健康检查
     */
    @GetMapping("/health")
    public BaseResponse<String> health() throws InterruptedException {
//        new Thread(() -> {
//            try {
//                Thread.sleep(100000L);
//            } catch (InterruptedException e) {
//                throw new RuntimeException(e);
//            }
//        }).start();
        return ResultUtils.success("ok");
    }
}
