Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/com/swyp8team2/common/dev/DataInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public class DataInitializer {
@Transactional
public void init() {
List<NicknameAdjective> adjectives = nicknameAdjectiveRepository.findAll();
User testUser = userRepository.save(User.create("nickname", "defailt_profile_image"));
User testUser = userRepository.save(User.create("nickname", "https://t1.kakaocdn.net/account_images/default_profile.jpeg"));
TokenPair tokenPair = jwtService.createToken(testUser.getId());
System.out.println("accessToken = " + tokenPair.accessToken());
System.out.println("refreshToken = " + tokenPair.refreshToken());
List<User> users = new ArrayList<>();
List<Post> posts = new ArrayList<>();
for (int i = 0; i < 10; i++) {
User user = userRepository.save(User.create(adjectives.get(i).getAdjective(), "defailt_profile_image"));
User user = userRepository.save(User.create(adjectives.get(i).getAdjective(), "https://t1.kakaocdn.net/account_images/default_profile.jpeg"));
users.add(user);
for (int j = 0; j < 30; j += 2) {
ImageFile imageFile1 = imageFileRepository.save(ImageFile.create(new ImageFileDto("202502240006030.png", "https://image.photopic.site/images-dev/202502240006030.png", "https://image.photopic.site/images-dev/resized_202502240006030.png")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private PostImageResponse createVoteResponseDto(PostImage image, Long userId, Lo
image.getId(),
image.getName(),
imageFile.getImageUrl(),
imageFile.getThumbnailUrl(),
voted
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public ResponseEntity<PostResponse> findPost(@PathVariable("shareUrl") String sh
),
"description",
List.of(
new PostImageResponse(1L, "๋ฝ€๋˜A", "https://image.photopic.site/1", true),
new PostImageResponse(2L, "๋ฝ€๋˜B", "https://image.photopic.site/2", false)
new PostImageResponse(1L, "๋ฝ€๋˜A", "https://image.photopic.site/image/1", "https://image.photopic.site/image/resize/1", true),
new PostImageResponse(2L, "๋ฝ€๋˜B", "https://image.photopic.site/image/2", "https://image.photopic.site/image/resize/1", false)
),
"https://photopic.site/shareurl",
LocalDateTime.of(2025, 2, 13, 12, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public record PostImageResponse(
Long id,
String imageName,
String imageUrl,
String thumbnailUrl,
boolean voted
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ void findPost() throws Exception {
),
"description",
List.of(
new PostImageResponse(1L, "๋ฝ€๋˜A", "https://image.photopic.site/1", true),
new PostImageResponse(2L, "๋ฝ€๋˜B", "https://image.photopic.site/2", false)
new PostImageResponse(1L, "๋ฝ€๋˜A", "https://image.photopic.site/image/1", "https://image.photopic.site/image/resize/1", true),
new PostImageResponse(2L, "๋ฝ€๋˜B", "https://image.photopic.site/image/2", "https://image.photopic.site/image/resize/2", false)
),
"https://photopic.site/shareurl",
LocalDateTime.of(2025, 2, 13, 12, 0)
Expand All @@ -114,6 +114,7 @@ void findPost() throws Exception {
fieldWithPath("images[].id").type(JsonFieldType.NUMBER).description("ํˆฌํ‘œ ์„ ํƒ์ง€ Id"),
fieldWithPath("images[].imageName").type(JsonFieldType.STRING).description("์‚ฌ์ง„ ์ด๋ฆ„"),
fieldWithPath("images[].imageUrl").type(JsonFieldType.STRING).description("์‚ฌ์ง„ ์ด๋ฏธ์ง€"),
fieldWithPath("images[].thumbnailUrl").type(JsonFieldType.STRING).description("ํ™•๋Œ€ ์‚ฌ์ง„ ์ด๋ฏธ์ง€"),
fieldWithPath("images[].voted").type(JsonFieldType.BOOLEAN).description("ํˆฌํ‘œ ์—ฌ๋ถ€"),
fieldWithPath("shareUrl").type(JsonFieldType.STRING).description("๊ฒŒ์‹œ๊ธ€ ๊ณต์œ  URL"),
fieldWithPath("createdAt").type(JsonFieldType.STRING).description("๊ฒŒ์‹œ๊ธ€ ์ƒ์„ฑ ์‹œ๊ฐ„")
Expand Down