24 lines
987 B
Java
24 lines
987 B
Java
package com.example.demo.controller;
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import com.example.demo.service.AuthService;
|
|
|
|
|
|
@RestController
|
|
@RequestMapping("/api/auth")
|
|
public class authController {
|
|
private final AuthService authService;
|
|
|
|
@PostMapping("/login")
|
|
public ResponseEntity<String> login(@RequestBody LoginRequest loginRequest) {
|
|
String token = authService.authenticate(loginRequest.getUsername(), loginRequest.getPassword());
|
|
return ResponseEntity.ok(token);
|
|
}
|
|
}
|
|
|
|
/* 안녕하세요 IPP 교육생 김대훈입니다.
|
|
1월 8일(수)에 IPP 관련 학교 행사에 참여하게 되어서 해당 날짜에 출근하지 않고 바로 행사장소로 간다고 합니다.
|
|
해당 사안에 관해서 학교와 인사 담당자님과 이야기 됐다고 합니다.
|
|
인사 담당자님께서 담당교사님께 전달하라고 하셔서 이렇게 메시지 보냅니다! 감사합니다. */ |