-
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
1 parent
b7a6add
commit 566d93f
Showing
5 changed files
with
92 additions
and
8 deletions.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
src/main/java/com/gt/genti/adapter/in/web/UserExampleController.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,40 @@ | ||
package com.gt.genti.adapter.in.web; | ||
|
||
import static com.gt.genti.other.util.ApiUtils.*; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import com.gt.genti.dto.AddPromptOnlyExampleRequestDto; | ||
import com.gt.genti.dto.AddResponseExampleRequestDto; | ||
import com.gt.genti.dto.PromptOnlyExampleResponseDto; | ||
import com.gt.genti.dto.ResponseExampleResponseDto; | ||
import com.gt.genti.other.auth.UserDetailsImpl; | ||
import com.gt.genti.service.ResponseExampleService; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequestMapping("/api/user/examples") | ||
@RequiredArgsConstructor | ||
public class UserExampleController { | ||
private final ResponseExampleService responseExampleService; | ||
|
||
@GetMapping("/with-picture") | ||
public ResponseEntity<ApiResult<List<ResponseExampleResponseDto>>> getAllResponseExamples() { | ||
return success(responseExampleService.getAllResponseExamples()); | ||
} | ||
|
||
@GetMapping("/prompt-only") | ||
public ResponseEntity<ApiResult<List<PromptOnlyExampleResponseDto>>> getAllPromptOnlyExamples() { | ||
return success(responseExampleService.getAllPromptOnlyExamples()); | ||
} | ||
|
||
} |
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
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
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