Skip to content

Commit

Permalink
feat : keyword조회추가
Browse files Browse the repository at this point in the history
  • Loading branch information
minseok1015 committed Aug 20, 2024
1 parent d6233a5 commit 2acf415
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import store.itpick.backend.dto.keyword.SearchDTO;
import store.itpick.backend.dto.debate.DebateByKeywordDTO;
import store.itpick.backend.model.Keyword;
import store.itpick.backend.repository.KeywordRepository;
import store.itpick.backend.service.KeywordService;

import java.util.List;
Expand All @@ -25,6 +26,7 @@
public class KeywordController {

private final KeywordService keywordService;
private final KeywordRepository keywordRepository;

@GetMapping("/search/nobadge")
public BaseResponse<List<String>> searchKeywords(@RequestParam String query) {
Expand All @@ -43,5 +45,13 @@ public BaseResponse<List<SearchDTO>> searchKeywordsWithBadge(@RequestParam Strin
return new BaseResponse<>(keywords);
}

@GetMapping("")
public BaseResponse<String> getKeyword(@RequestParam Long keywordId) {


Keyword keyword =keywordRepository.getById(keywordId);
return new BaseResponse<>(keyword.getKeyword());
}


}

0 comments on commit 2acf415

Please sign in to comment.