package com.its.web.controller.login;

import com.its.web.service.admin.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/login")
@Api(tags = "00.로그인 컨트롤러")
public class LoginController {

    private final LoginService service;

    @ApiOperation(value = "00.로그인 - 로그인 정보 확인")
    @PostMapping("/loginCheck")
    @ResponseBody
    public Map<String, String> loginCheck(@Param("id") String id, @Param("pwd") String pwd) {
        return this.service.loginCheck(id, pwd);
    }
}
