-
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.
Browse files
Browse the repository at this point in the history
[#41] fix : toastListDto추가
- Loading branch information
Showing
6 changed files
with
18 additions
and
4 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
3 changes: 2 additions & 1 deletion
3
linkmind/src/main/java/com/app/toaster/controller/response/main/MainPageResponseDto.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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package com.app.toaster.controller.response.main; | ||
|
||
import com.app.toaster.controller.response.category.CategoriesReponse; | ||
import com.app.toaster.controller.response.toast.MainToastDto; | ||
import com.app.toaster.domain.RecommendSite; | ||
import lombok.Builder; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Builder | ||
public record MainPageResponseDto(String nickname, int readToastNum, int allToastNum, List<CategoriesReponse> mainCategoryListDto, List<RecommendSite> recommendedSiteListDto) { | ||
public record MainPageResponseDto(String nickname, int readToastNum, int allToastNum, List<CategoriesReponse> mainCategoryListDto, List<MainToastDto> toastListDto, List<RecommendSite> recommendedSiteListDto) { | ||
} |
9 changes: 9 additions & 0 deletions
9
linkmind/src/main/java/com/app/toaster/controller/response/toast/MainToastDto.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,9 @@ | ||
package com.app.toaster.controller.response.toast; | ||
|
||
import com.app.toaster.domain.Toast; | ||
|
||
public record MainToastDto(Long toastId, String toastTitle, String toastImg, String toastLink) { | ||
public static MainToastDto of(Toast toast){ | ||
return new MainToastDto(toast.getId(), toast.getTitle(), toast.getThumbnailUrl(), toast.getLinkUrl()); | ||
} | ||
} |
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