Skip to content

Commit e233e80

Browse files
authored
Merge pull request #208 from Travlocks/refactor/#191-explore-pagination
[fix] 본인 작성 비공개 템플릿 조회 코드 수정
2 parents 7acf10e + b2d983a commit e233e80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/umc/travlocksserver/domain/template/service/query/TemplateQueryService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public TemplateDetailResponseDTO getTemplateDetail(Long templateId, Long memberI
105105
Template template = templateRepository.findById(templateId)
106106
.orElseThrow(() -> new TemplateException(TemplateErrorCode.TEMPLATE_NOT_FOUND));
107107

108-
if (!template.getIsPublic()) {
108+
if (!template.getIsPublic() && !template.getOwner().getId().equals(memberId)) {
109109
throw new TemplateException(TemplateErrorCode.TEMPLATE_NOT_PUBLIC);
110110
}
111111

0 commit comments

Comments
 (0)