Skip to content

Commit

Permalink
Refactr: #218 genti-api - responseexample 관련 API 및 메서드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJae-H committed Dec 10, 2024
1 parent db76dcc commit 8943a8f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 149 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ public class ResponseExampleService {
private final ResponseExampleRepository responseExampleRepository;
private final UserRepository userRepository;

public Page<ExampleWithPictureFindResponseDto> getAllResponseExamplesPagination(Pageable pageable) {
return responseExampleRepository.findAllByPromptOnlyIsFalse(pageable)
.map(ExampleWithPictureFindResponseDto::new);
}

public List<ExampleWithPictureFindResponseDto> getAllResponseExamples() {
List<ExampleWithPictureFindResponseDto> examples = responseExampleRepository.findAllByPromptOnlyIsFalse()
.stream()
Expand All @@ -55,19 +50,6 @@ public List<ExampleWithPictureFindResponseDto> getAllResponseExamples() {
return examples;
}

public void addResponseExamples(List<ExampleSaveCommand> commandList,
Long userId) {
User foundUploader = userRepository.findById(userId).orElseThrow(() -> ExpectedException.withLogging(
ResponseCode.UserNotFound, userId));
responseExampleRepository.saveAll(
commandList.stream().map(command -> ResponseExample.builder()
.key(command.getKey())
.uploadedBy(foundUploader)
.pictureRatio(command.getPictureRatio())
.prompt(command.getPrompt())
.build()).toList());
}

public List<ExampleWithSquarePicture> getAllResponseExamplesInGenerateView() {
final String type = "FREE_ONE";
List<ExampleWithSquarePicture> examples = responseExampleRepository.findAllByType(type)
Expand Down

0 comments on commit 8943a8f

Please sign in to comment.