-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add SummarizationController (#7)
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/com/beotkkot/qtudy/controller/post/SummarizationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.beotkkot.qtudy.controller.post; | ||
|
||
import com.beotkkot.qtudy.dto.response.posts.GetSummaryResponseDto; | ||
import com.beotkkot.qtudy.service.posts.PostsService; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
public class SummarizationController { | ||
|
||
private final PostsService postsService; | ||
|
||
/** | ||
* ์ฌ์ฉ์๊ฐ ์์ฑํ ๊ธ์ ๋ํด AI๊ฐ ์์ฝํ ๋ด์ฉ์ ๋ฐํํ๋ค. | ||
*/ | ||
@GetMapping("summary/{postId}") | ||
public ResponseEntity<? super GetSummaryResponseDto> summary(@PathVariable("postId") Long postId) { | ||
// ํฌ์คํธ ์์ด๋๋ก๋ถํฐ ํฌ์คํธ ์ป์ด์ค๊ธฐ | ||
ResponseEntity<? super GetSummaryResponseDto> response = postsService.getSummary(postId); | ||
return response; | ||
} | ||
} |