Skip to content

Commit

Permalink
🔀 :: (#82) 공지사항 알람 버그 해결 (#227)
Browse files Browse the repository at this point in the history
* ♻️ :: 리턴타입 nullable 설정

* ♻️ :: ? 삭제

* ♻️ :: 객체로 보내는 로직 삭제

* ♻️ :: 객체 로직으로 재변경

* ♻️ :: 안 쓰는 import 삭제

* ♻️ :: 클래스명 변경
  • Loading branch information
jyk1029 authored Jun 2, 2023
1 parent ccb198c commit bada46c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.github.v1servicenotification.detail.spi
import java.util.UUID

interface PostDetailUserSpi {
fun getExcludeUserIdList(userIdList: List<UUID>?): List<UUID>
fun getExcludeUserIdList(userIdList: List<UUID>): List<UUID>
fun getDeviceToken(userId: UUID): String
fun getDeviceTokenList(userIdList: List<UUID>): List<String>
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class InMemoryUser: PostDetailUserSpi {
this.userId = userId
}

override fun getExcludeUserIdList(userIdList: List<UUID>?): List<UUID> {
override fun getExcludeUserIdList(userIdList: List<UUID>): List<UUID> {
return listOf(userId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.v1servicenotification.domain.user.domain.repository

import io.github.v1servicenotification.detail.spi.PostDetailUserSpi
import io.github.v1servicenotification.infrastructure.feign.client.UserClient
import io.github.v1servicenotification.infrastructure.feign.client.dto.request.ExcludeUserIdsRequest
import io.github.v1servicenotification.infrastructure.feign.client.dto.request.GetExcludeUserIdsRequest
import io.github.v1servicenotification.infrastructure.feign.error.FeignBadRequestException
import org.springframework.stereotype.Component
import java.util.UUID
Expand All @@ -11,8 +11,8 @@ import java.util.UUID
class CustomPostDetailUserImpl(
private val userClient: UserClient
) : PostDetailUserSpi {
override fun getExcludeUserIdList(userIdList: List<UUID>?): List<UUID> {
val userIdsRequest = ExcludeUserIdsRequest(userIdList)
override fun getExcludeUserIdList(userIdList: List<UUID>): List<UUID> {
val userIdsRequest = GetExcludeUserIdsRequest(userIdList)
return userClient.getExcludeUserIdList(userIdsRequest).userIdList
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.v1servicenotification.infrastructure.feign.client

import io.github.v1servicenotification.infrastructure.feign.client.dto.request.ExcludeUserIdsRequest
import io.github.v1servicenotification.infrastructure.feign.client.dto.request.GetExcludeUserIdsRequest
import io.github.v1servicenotification.infrastructure.feign.client.dto.response.TokenResponse
import io.github.v1servicenotification.infrastructure.feign.client.dto.response.UserIdListResponse
import org.springframework.cloud.openfeign.FeignClient
Expand All @@ -16,5 +16,5 @@ interface UserClient {
fun token(@RequestParam("users") userList: List<UUID>): TokenResponse

@GetMapping("/users/exclude")
fun getExcludeUserIdList(@RequestBody request: ExcludeUserIdsRequest): UserIdListResponse
fun getExcludeUserIdList(@RequestBody request: GetExcludeUserIdsRequest): UserIdListResponse
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.github.v1servicenotification.infrastructure.feign.client.dto.request

import java.util.UUID

data class GetExcludeUserIdsRequest(
val userIdList: List<UUID>,
)

0 comments on commit bada46c

Please sign in to comment.