Skip to content

Commit

Permalink
fix: pose noti 알림 저장 로직을 분리하여 진행
Browse files Browse the repository at this point in the history
  • Loading branch information
DongGeon0908 committed Sep 25, 2024
1 parent c3f3c35 commit 27017d2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ class PoseNotificationService(
val poseNotification = findByUidOrNull(user.uid)

val registeredPoseNotification = txTemplates.writer.executes {
poseNotification?.apply {
val noti = poseNotification?.apply {
this.isActive = request.isActive
this.duration = request.duration
} ?: PoseNotification(
uid = user.uid,
isActive = request.isActive,
duration = request.duration
).run { poseNotificationRepository.save(this) }
)

poseNotificationRepository.save(noti)
}

return CreatePoseNotificationResponse.from(registeredPoseNotification)
Expand Down

0 comments on commit 27017d2

Please sign in to comment.