Skip to content

Commit

Permalink
Merge pull request #9 from UMC6th-TeamC/feature/#8
Browse files Browse the repository at this point in the history
hotfix: cors 오류 수정1
  • Loading branch information
HyunwooYi authored Jun 22, 2024
2 parents d66663b + 4549f40 commit 54ed560
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequiredArgsConstructor
@CrossOrigin("*")
public class ChatController {

private final ChatService chatService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import com.umc.teamC.domain.chat.entity.Chat;
import com.umc.teamC.domain.chat.service.ChatService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@CrossOrigin("*")
class HistoryController {

private final ChatService chatService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.umc.teamC.global.common.BaseResponse;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -15,7 +16,7 @@

@RestController
@RequiredArgsConstructor

@CrossOrigin("*")
public class MailController {

private final EmailService emailService;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//package com.umc.teamC.domain.notification.controller;
//
//import com.umc.teamC.domain.user.entity.User;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
//
//@RestController
//@RequiredArgsConstructor
//public class NotificationController {
//
// private final NotificationService notificationService;
//
// @GetMapping(path = "/api/v1/notifications/stream")
// public SseEmitter streamNotifications(@AuthenticationPrinciple User user) {
// return notificationService.createEmitter(user.getId());
// }
//
//}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import com.umc.teamC.domain.user.service.JoinService;
import com.umc.teamC.global.common.BaseResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@CrossOrigin("*")
public class JoinController {

private final JoinService joinService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

import com.umc.teamC.global.common.BaseResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@CrossOrigin("*")
public class MainController {
@GetMapping("/")
public BaseResponse<String> MainP() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

@Controller
@ResponseBody
@CrossOrigin("*")
public class UserController {
private final UserService userService;

Expand Down

0 comments on commit 54ed560

Please sign in to comment.