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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public record AppVersionPageSummaryResponse(
Long id,
String path,
String title,
String description
String description,
boolean isProtected
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ public record AppVersionPageSummaryWithVersionResponse(
Long id,
String path,
String title,
String description
String description,
boolean isProtected
) {

public AppVersionPageSummaryResponse toSummary() {
return new AppVersionPageSummaryResponse(id, path, title, description);
return new AppVersionPageSummaryResponse(id, path, title, description, isProtected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ public interface AppVersionPageRepository extends JpaRepository<AppVersionPage,
List<AppVersionPage> findAllByAppVersionId(Long appVersionId);

@Query("select new redot.redot_server.domain.cms.site.page.dto.response.AppVersionPageSummaryResponse(" +
" ap.id, ap.path, ap.title, ap.description)" +
" ap.id, ap.path, ap.title, ap.description, ap.isProtected)" +
" from AppVersionPage avp" +
" join avp.appPage ap" +
" where avp.appVersion.id = :appVersionId")
List<AppVersionPageSummaryResponse> findSummariesByAppVersionId(@Param("appVersionId") Long appVersionId);

@Query("select new redot.redot_server.domain.cms.site.page.service.dto.AppVersionPageSummaryWithVersionResponse(" +
" avp.appVersion.id, ap.id, ap.path, ap.title, ap.description)" +
" avp.appVersion.id, ap.id, ap.path, ap.title, ap.description, ap.isProtected)" +
" from AppVersionPage avp" +
" join avp.appPage ap" +
" where avp.appVersion.id in :appVersionIds")
Expand Down