Skip to content

Commit

Permalink
feat: Add SummarizationController (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahyun0326 committed Mar 17, 2024
1 parent 00922aa commit fd0a9f5
Showing 1 changed file with 28 additions and 0 deletions.
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;
}
}

0 comments on commit fd0a9f5

Please sign in to comment.