BE/userinfo

This commit is contained in:
박정민 2024-08-02 11:14:41 +09:00
parent 9a520316ca
commit 8fdda0f6af
3 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,7 @@ public class WebConfiguration implements WebMvcConfigurer {
registry
.addMapping("/**")
.allowedOriginPatterns("https://i11a701.p.ssafy.io/", "http://localhost:5173", "http://localhost:4173","http://localhost:5080","http://192.168.*.*:5173")
.allowedMethods(HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(),
.allowedMethods("GET","POST",HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.PUT.name(),
HttpMethod.DELETE.name(), HttpMethod.HEAD.name(), HttpMethod.OPTIONS.name(),
HttpMethod.PATCH.name())
.allowCredentials(true)

View File

@ -26,6 +26,7 @@ import java.util.Map;
@RequestMapping("/user")
@Slf4j
@RequiredArgsConstructor
public class UserController {
private final UserService userService;
@ -152,7 +153,6 @@ public class UserController {
}
@GetMapping("/logout")
public ResponseEntity<?> removeToken(HttpServletRequest request) {
Map<String, Object> resultMap = new HashMap<>();
HttpStatus status = HttpStatus.ACCEPTED;

View File

@ -88,6 +88,9 @@ public class Controller {
public ResponseEntity<Map<String, String>> joinRoom(@PathVariable("lecture_id") Long id, HttpServletRequest request) throws Exception
{
// 조인할떄 고려해야할점
// 1. 신청됀 강의인지
// 2. 강의기 On인지
String userToken = request.getHeader("Authorization");