응원 수정 기능 리팩토링
This commit is contained in:
parent
74f7c75012
commit
ab4a2d0e6b
|
@ -371,18 +371,19 @@ class ExplorerService(
|
|||
val cheers = queryRepository.getCheers(request.cheersId)
|
||||
?: throw SodaException("잘못된 요청입니다.")
|
||||
|
||||
if (cheers.creator!!.id!! != member.id!!) {
|
||||
if (cheers.member!!.id != member.id!!) {
|
||||
throw SodaException("잘못된 요청입니다.")
|
||||
}
|
||||
|
||||
if (cheers.member!!.id!! == member.id!!) {
|
||||
if (request.content != null) {
|
||||
cheers.cheers = request.content
|
||||
}
|
||||
}
|
||||
|
||||
if (request.isActive != null) {
|
||||
cheers.isActive = request.isActive
|
||||
if (
|
||||
cheers.creator!!.id!! == member.id!! ||
|
||||
cheers.member!!.id!! == member.id!!
|
||||
) {
|
||||
if (request.isActive != null) {
|
||||
cheers.isActive = request.isActive
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue