Merge pull request '내 콘텐츠 수정, 삭제 시 콘텐츠 조회 함수' (#239) from test into main

Reviewed-on: #239
This commit is contained in:
klaus 2024-11-21 06:34:30 +00:00
commit 79f5a0f520
2 changed files with 5 additions and 2 deletions

View File

@ -138,8 +138,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
return queryFactory
.selectFrom(audioContent)
.where(
audioContent.isActive.isTrue
.and(audioContent.id.eq(contentId))
audioContent.id.eq(contentId)
.and(audioContent.member.id.eq(creatorId))
)
.fetchOne()

View File

@ -760,6 +760,10 @@ class AudioContentService(
val audioContent = repository.findByIdAndCreatorId(contentId = contentId, creatorId = member.id!!)
?: throw SodaException("잘못된 콘텐츠 입니다.\n다시 시도해 주세요.")
if (audioContent.releaseDate != null && audioContent.releaseDate!! >= LocalDateTime.now()) {
throw SodaException("콘텐츠 오픈 후 채널에 고정이 가능합니다.")
}
var pinContent = pinContentRepository.findByContentIdAndMemberId(
contentId = contentId,
memberId = member.id!!