Skip to content

Commit

Permalink
✏️ [FIX] CloudFront URL로 더미데이터, 스웨거 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ddongseop committed Jan 15, 2024
1 parent 89c44ea commit 91536f7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
15 changes: 7 additions & 8 deletions src/main/java/org/sopt/lequuServer/InitDb.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package org.sopt.lequuServer;

import static org.sopt.lequuServer.domain.sticker.model.StickerCategory.ALPHABET;
import static org.sopt.lequuServer.domain.sticker.model.StickerCategory.BIRTHDAY;
import static org.sopt.lequuServer.domain.sticker.model.StickerCategory.CHARACTER;

import jakarta.annotation.PostConstruct;
import jakarta.persistence.EntityManager;
import java.util.Arrays;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.sopt.lequuServer.domain.book.model.Book;
import org.sopt.lequuServer.domain.member.model.Member;
Expand All @@ -18,6 +12,11 @@
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.Arrays;
import java.util.List;

import static org.sopt.lequuServer.domain.sticker.model.StickerCategory.*;

@Component
@RequiredArgsConstructor
public class InitDb {
Expand Down Expand Up @@ -50,7 +49,7 @@ public void dbInit() {
if (!isDatabaseEmpty()) {
return;
}

Member member1 = Member.builder()
.socialPlatform(SocialPlatform.KAKAO)
.socialId("3251153440")
Expand Down Expand Up @@ -86,7 +85,7 @@ public void dbInit() {
for (int i = 0; i < 3; i++) {
Note note = Note.builder()
.content("레큐노트 내용입니다 블라블라블라 블라블라블라 블라블라블라 블라블라블라 블라블라블라 블라블라블라 블라블라블라")
.background("https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/notes/background_image/676c2ca3-f868-423f-8000-a0bcb67dc797.jpg")
.background("https://dzfv99wxq6tx0.cloudfront.net/notes/background_image/676c2ca3-f868-423f-8000-a0bcb67dc797.jpg")
.textColor("#000000")
.member(member1)
.book(book1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
package org.sopt.lequuServer.domain.book.dto.response;

import static java.util.Comparator.comparing;

import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import org.sopt.lequuServer.domain.book.model.Book;
import org.sopt.lequuServer.domain.note.dto.response.NoteDetailResponseDto;
import org.sopt.lequuServer.domain.note.model.Note;
import org.sopt.lequuServer.domain.sticker.dto.response.PostedStickerDetailResponseDto;
import org.sopt.lequuServer.domain.sticker.model.PostedSticker;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import static java.util.Comparator.comparing;

public record BookDetailResponseDto(

@Schema(description = "레큐북 고유 id", example = "1")
Long bookId,

@Schema(description = "최애 사진", example = "https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/books/favorite_image/b4006561-382b-479e-ae1d-e841922e883f.jpg")
@Schema(description = "최애 사진", example = "https://dzfv99wxq6tx0.cloudfront.net/books/favorite_image/b4006561-382b-479e-ae1d-e841922e883f.jpg")
String favoriteImage,

@Schema(description = "최애 이름", example = "LeoJ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public record PopularBookResponseDto(
@Schema(description = "최애 이름", example = "LeoJ")
String favoriteName,

@Schema(description = "최애 사진", example = "https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/books/favorite_image/b4006561-382b-479e-ae1d-e841922e883f.jpg")
@Schema(description = "최애 사진", example = "https://dzfv99wxq6tx0.cloudfront.net/books/favorite_image/b4006561-382b-479e-ae1d-e841922e883f.jpg")
String favoriteImage
) {
public static PopularBookResponseDto of(Book book) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public record MypageNoteListResponseDto(
@Schema(description = "레큐노트 텍스트 컬러 번호", example = "#FFFFFF")
String noteTextColor,

@Schema(description = "레큐노트 배경 (#FFFFFF or 이미지 URL(*.jpg))", example = "https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/notes/background_image/676c2ca3-f868-423f-8000-a0bcb67dc797.jpg")
@Schema(description = "레큐노트 배경 (#FFFFFF or 이미지 URL(*.jpg))", example = "https://dzfv99wxq6tx0.cloudfront.net/notes/background_image/676c2ca3-f868-423f-8000-a0bcb67dc797.jpg")
String noteBackground
) {
public static MypageNoteListResponseDto of(Note note) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public record NoteCreateResponseDto(
public static NoteCreateResponseDto of(Note note) {
return new NoteCreateResponseDto(note.getId(), note.getBook().getUuid());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public record NoteDetailResponseDto(
@Schema(description = "레큐노트 텍스트 컬러", example = "#FFFFFF")
String noteTextColor,

@Schema(description = "레큐노트 배경 (#FFFFFF or 이미지 URL(*.jpg))", example = "https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/notes/background_image/676c2ca3-f868-423f-8000-a0bcb67dc797.jpg")
@Schema(description = "레큐노트 배경 (#FFFFFF or 이미지 URL(*.jpg))", example = "https://dzfv99wxq6tx0.cloudfront.net/notes/background_image/676c2ca3-f868-423f-8000-a0bcb67dc797.jpg")
String noteBackground
) {
public static NoteDetailResponseDto of(Note note, int renderType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public record PostedStickerDetailResponseDto(
@Schema(description = "스티커 고유 id", example = "1")
Long postedStickerId,

@Schema(description = "스티커 이미지", example = "https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/stickers/birth_1.svg")
@Schema(description = "스티커 이미지", example = "https://dzfv99wxq6tx0.cloudfront.net/stickers/birth_1.svg")
String stickerImage,

@Schema(description = "스티커 위치(X축)", example = "30")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public record StickerResponseDto(
@Schema(description = "스티커 고유 id", example = "1")
Long stickerId,

@Schema(description = "스티커 이미지", example = "https://lequu-server-bucket.s3.ap-northeast-2.amazonaws.com/stickers/birth_1.svg")
@Schema(description = "스티커 이미지", example = "https://dzfv99wxq6tx0.cloudfront.net/stickers/birth_1.svg")
String stickerImage
) {
public static StickerResponseDto of(Sticker sticker) {
Expand Down

0 comments on commit 91536f7

Please sign in to comment.