-
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.
- Loading branch information
Showing
1 changed file
with
39 additions
and
1 deletion.
There are no files selected for viewing
40 changes: 39 additions & 1 deletion
40
src/main/java/com/efub/clone/acmicpc/web/HomeController.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 |
---|---|---|
@@ -1,4 +1,42 @@ | ||
package com.efub.clone.acmicpc.web; | ||
|
||
import com.efub.clone.acmicpc.service.BoardService; | ||
import com.efub.clone.acmicpc.service.ProblemService; | ||
import com.efub.clone.acmicpc.service.UserService; | ||
import com.efub.clone.acmicpc.web.dto.BoardListResponseDto; | ||
import com.efub.clone.acmicpc.web.dto.ProblemListResponseDto; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.util.List; | ||
|
||
@RequiredArgsConstructor | ||
@RestController | ||
public class HomeController { | ||
} | ||
public final UserService userService; | ||
public final BoardService boardService; | ||
public final ProblemService problemService; | ||
|
||
@GetMapping | ||
@RequestMapping(value = "/") | ||
public List<BoardListResponseDto> board_findAllDesc() { return boardService.findAllDesc(); } | ||
|
||
@GetMapping | ||
@RequestMapping(value = "/") | ||
public List<ProblemListResponseDto> problem_findAllDesc() { return problemService.findAllDesc(); } | ||
|
||
@GetMapping | ||
@RequestMapping(value = "/") | ||
public List<ProblemListResponseDto> findMultilingual() { return problemService.findMultilingualDesc(); } | ||
|
||
@GetMapping | ||
@RequestMapping(value = "/") | ||
public List<ProblemListResponseDto> findAllSortByRank(){ | ||
return problemService.findAllSortByRank(); | ||
} | ||
|
||
|
||
|
||
} |