Skip to content

Commit 7a0b44b

Browse files
committed
update :: id 비교에서 객체 비교로 수정
1 parent 1bfb6e8 commit 7a0b44b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bitgouel-api/src/main/kotlin/team/msg/common/aop/HttpLoggingAspect.kt renamed to bitgouel-api/src/main/kotlin/team/msg/common/aop/log/HttpLoggingAspect.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package team.msg.common.aop
1+
package team.msg.common.aop.log
22

33
import org.aspectj.lang.JoinPoint
44
import org.aspectj.lang.ProceedingJoinPoint

bitgouel-api/src/main/kotlin/team/msg/domain/student/service/StudentActivityServiceImpl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class StudentActivityServiceImpl(
114114
val studentActivity = studentActivityRepository.findByIdOrNull(id)
115115
?: throw StudentActivityNotFoundException("학생 활동을 찾을 수 없습니다. info : [ studentActivityId = $id ]")
116116

117-
if(student.id != studentActivity.student.id)
117+
if(student != studentActivity.student)
118118
throw ForbiddenStudentActivityException("해당 학생 활동에 대한 권한이 없습니다. info : [ studentId = ${student.id} ]")
119119

120120
studentActivityRepository.delete(studentActivity)
@@ -134,7 +134,7 @@ class StudentActivityServiceImpl(
134134
val studentActivity = studentActivityRepository.findByIdOrNull(id)
135135
?: throw StudentActivityNotFoundException("학생 활동을 찾을 수 없습니다. info : [ studentActivityId = $id ]")
136136

137-
if(teacher.id != studentActivity.teacher.id)
137+
if(teacher != studentActivity.teacher)
138138
throw ForbiddenStudentActivityException("해당 학생 활동에 대한 권한이 없습니다. info : [ teacherId = ${teacher.id} ]")
139139

140140
studentActivityRepository.delete(studentActivity)
@@ -154,7 +154,7 @@ class StudentActivityServiceImpl(
154154
val studentActivity = studentActivityRepository.findByIdOrNull(id)
155155
?: throw StudentActivityNotFoundException("학생 활동을 찾을 수 없습니다. info : [ studentActivityId = $id ]")
156156

157-
if(teacher.id != studentActivity.teacher.id)
157+
if(teacher != studentActivity.teacher)
158158
throw ForbiddenStudentActivityException("해당 학생 활동에 대한 권한이 없습니다. info : [ teacherId = ${teacher.id} ]")
159159

160160
val updatedStudentActivity = StudentActivity(

0 commit comments

Comments
 (0)