Skip to content

Commit

Permalink
bugfix : CROSS ORIGIN ERROR fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fing9 committed Dec 6, 2023
1 parent d982504 commit 6012256
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
Expand Down Expand Up @@ -56,7 +57,7 @@ public ResponseEntity<String> findRecommendProblems(String title) {
entity, // {요청할 때 보낼 데이터}
String.class // {요청시 반환되는 데이터 타입}
);
return response;
return new ResponseEntity<>(response.getBody(), HttpStatus.OK);
}

@Transactional
Expand All @@ -82,6 +83,7 @@ public ResponseEntity<String> findClusterProblems(String bojHandle) {
entity, // {요청할 때 보낼 데이터}
String.class // {요청시 반환되는 데이터 타입}
);
return response;

return new ResponseEntity<>(response.getBody(), HttpStatus.OK);
}
}

0 comments on commit 6012256

Please sign in to comment.