File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
kotlin/nexters/tuk/application Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ class DeviceService(
1717 memberId : Long ,
1818 command : DeviceCommand .UpdateDeviceToken ,
1919 ): DeviceResponse .UpdateDeviceToken {
20- val deviceToken =
21- command.deviceInfo. deviceToken ? : throw IllegalArgumentException ( " 디바이스 토큰은 필수 정보입니다." )
20+ val deviceToken = command.deviceInfo.deviceToken
21+ require( ! deviceToken.isNullOrBlank()) { " 디바이스 토큰은 필수 정보입니다." }
2222
2323 val device = deviceRepository.findByDeviceIdAndMemberId(
2424 deviceId = command.deviceInfo.deviceId,
Original file line number Diff line number Diff line change @@ -39,8 +39,10 @@ class PushService(
3939 memberIds : List <Long >,
4040 pushMessage : PushMessage ,
4141 ) {
42+ logger.info(" PushService.pushAll -> memberIds: $memberIds " )
4243 val memberNameMap = memberService.getMembers(memberIds).associate { it.memberId to it.memberName }
4344 deviceService.getDeviceTokens(memberIds).forEach { token ->
45+ if (token.deviceToken.isBlank()) return @forEach
4446 pushSender.send(
4547 deviceTokens = listOf (DeviceToken (token.deviceToken)),
4648 message = PushCommand .MessagePayload (
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ spring:
1111 jpa :
1212 hibernate :
1313 ddl-auto : none
14- show-sql : true
14+ show-sql : false
1515 properties :
1616 hibernate :
1717 dialect : org.hibernate.dialect.MySQLDialect
You can’t perform that action at this time.
0 commit comments