package com.dbnt.kcgfilemanager.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequiredArgsConstructor
public class LoginController {


  @GetMapping("/user/login")
  public ModelAndView goLogin() {
    ModelAndView mav = new ModelAndView("login");
    return mav;
  }

  @GetMapping("/login-error")
  public ModelAndView loginError() {
    ModelAndView mav = new ModelAndView("/login");
    mav.addObject("loginError", true);
    return mav;
  }

  @GetMapping("/denied")
  public ModelAndView doDenied() {
    ModelAndView mav = new ModelAndView("login/denied");
    return mav;
  }

  @GetMapping("/info")
  public ModelAndView goMyInfo() {
    ModelAndView mav = new ModelAndView("login/myinfo");
    return mav;
  }

}
