Skip to content

Commit

Permalink
Merge pull request #20 from dnd-side-project/refactor/scope-main-api
Browse files Browse the repository at this point in the history
refactor : scope ์‘๋‹ต ์ถ”๊ฐ€
  • Loading branch information
1000kkannoo authored Aug 16, 2023
2 parents 4981067 + 034790b commit 35283eb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public List<LectureScopeListReadResponse.DetailLecture> findByBestLectures(Strin
return queryFactory
.select(Projections.fields(LectureScopeListReadResponse.DetailLecture.class,
lecture.id.as("id"),
lecture.source.as("source"),
lecture.imageUrl.as("imageUrl"),
lecture.title.as("title"),
lecture.name.as("name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static LectureScopeListReadResponse response(
@Builder
public static class DetailLecture {
private Long id;
private String source;
private String imageUrl;
private String title;
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,15 @@ void getScopeLectures() throws Exception {

// ์ถ”์ฒœ ๊ฐ•์˜ ์ƒ์„ฑ
LectureScopeListReadResponse.DetailLecture detailLecture1 = new LectureScopeListReadResponse.DetailLecture(
1L, "https://fastcampus.co.kr/dev_online_linux", "๋ฆฌ๋ˆ…์Šค ์‹ค์ „ ์ •๋ณต ์˜ฌ์ธ์› ํŒจํ‚ค์ง€ Online.", "๋ฐ•์ˆ˜ํ˜„,์›๊ทœ์—ฐ"
1L, "coloso", "https://fastcampus.co.kr/dev_online_linux", "๋ฆฌ๋ˆ…์Šค ์‹ค์ „ ์ •๋ณต ์˜ฌ์ธ์› ํŒจํ‚ค์ง€ Online.", "๋ฐ•์ˆ˜ํ˜„,์›๊ทœ์—ฐ"
);

LectureScopeListReadResponse.DetailLecture detailLecture2 = new LectureScopeListReadResponse.DetailLecture(
2L, "https://fastcampus.co.kr/data_online_msignature", "์ดˆ๊ฒฉ์ฐจ ํŒจํ‚ค์ง€ : 50๊ฐœ ํ”„๋กœ์ ํŠธ๋กœ ์™„๋ฒฝํ•˜๊ฒŒ ๋๋‚ด๋Š” ๋จธ์‹ ๋Ÿฌ๋‹ SIGNATURE", "๋ฐ•์ง€ํ™˜,์•ˆ๊ฑด์ด,๋ฐ•์ฐฝ์šฉ,๊น€์›๊ท "
2L, "coloso", "https://fastcampus.co.kr/data_online_msignature", "์ดˆ๊ฒฉ์ฐจ ํŒจํ‚ค์ง€ : 50๊ฐœ ํ”„๋กœ์ ํŠธ๋กœ ์™„๋ฒฝํ•˜๊ฒŒ ๋๋‚ด๋Š” ๋จธ์‹ ๋Ÿฌ๋‹ SIGNATURE", "๋ฐ•์ง€ํ™˜,์•ˆ๊ฑด์ด,๋ฐ•์ฐฝ์šฉ,๊น€์›๊ท "
);

LectureScopeListReadResponse.DetailLecture detailLecture3 = new LectureScopeListReadResponse.DetailLecture(
3L, "https://i.namu.wiki/i/Z6zyrokfaBgMqSMZdsGZXZ2u8CeM9ZOuyIgihmxorIVVNicpOtOcsF0P-LyBmH3pMbApRXnGQBAkvAN7JJQkU_GEmALHdP7l1R7oTHYp6MZKhF8aZ5TDc6kMSUB2Y60aZDSUnIcHwZzT4C5N7XkowQ.webp", "์˜๊ตญ ์š”๋ฆฌ๊ฐ€ ๋ง›์—†๋‹ค๋Š” ํŽธ๊ฒฌ์€ ๊ทธ๋งŒ! ์˜๊ตญ ์™•์‹ค ํŠน๋ณ„ ๋Œ€์ ‘ ๋ ˆ์‹œํ”ผ ํŒจํ‚ค์ง€", "์ผ€๋นˆ ๋ฐ๋ธŒ๋ผ์œ„๋„ˆ"
3L, "coloso", "https://i.namu.wiki/i/Z6zyrokfaBgMqSMZdsGZXZ2u8CeM9ZOuyIgihmxorIVVNicpOtOcsF0P-LyBmH3pMbApRXnGQBAkvAN7JJQkU_GEmALHdP7l1R7oTHYp6MZKhF8aZ5TDc6kMSUB2Y60aZDSUnIcHwZzT4C5N7XkowQ.webp", "์˜๊ตญ ์š”๋ฆฌ๊ฐ€ ๋ง›์—†๋‹ค๋Š” ํŽธ๊ฒฌ์€ ๊ทธ๋งŒ! ์˜๊ตญ ์™•์‹ค ํŠน๋ณ„ ๋Œ€์ ‘ ๋ ˆ์‹œํ”ผ ํŒจํ‚ค์ง€", "์ผ€๋นˆ ๋ฐ๋ธŒ๋ผ์œ„๋„ˆ"
);

List<LectureScopeListReadResponse.DetailLecture> bestLectures = List.of(detailLecture1, detailLecture2, detailLecture3);
Expand Down Expand Up @@ -422,6 +422,8 @@ void getScopeLectures() throws Exception {
.description("๊ฐ•์˜๋ ฅ ์ข‹์€ ๊ฐ•์˜ ๋ฆฌ์ŠคํŠธ"),
fieldWithPath("data.bestLectures[].id").type(NUMBER)
.description("๊ฐ•์˜ Id"),
fieldWithPath("data.bestLectures[].source").type(STRING)
.description("๊ฐ•์˜ ํ”Œ๋žซํผ"),
fieldWithPath("data.bestLectures[].imageUrl").type(STRING)
.description("๊ฐ•์˜ ์ด๋ฏธ์ง€ URL"),
fieldWithPath("data.bestLectures[].title").type(STRING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ private static Review getReview(
private static Lecture getLecture(String randomLectureTitle, String randomMainCategory) {
return Lecture.builder()
.title(randomLectureTitle)
.source("์ถœ์ฒ˜")
.source("coloso")
.url("URL")
.price("๊ฐ€๊ฒฉ")
.name("์ด๋ฆ„")
Expand Down

0 comments on commit 35283eb

Please sign in to comment.