Skip to content

Commit 52cf483

Browse files
authored
release: 1.9.4 (#209)
2 parents d346e86 + 9befce1 commit 52cf483

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/main/kotlin/org/gitanimals/quiz/app/DenyQuizFacade.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class DenyQuizFacade(
4040
)
4141

4242
inboxApi.inputInbox(
43-
InboxApi.InboxInputRequest(
43+
userId = notApprovedQuiz.userId,
44+
request = InboxApi.InboxInputRequest(
4445
publisher = InboxApi.InboxInputRequest.Publisher(
4546
publisher = "QUIZ",
4647
publishedAt = clock.instant(),
@@ -53,7 +54,7 @@ class DenyQuizFacade(
5354
image = "https://avatars.githubusercontent.com/u/171903401?s=200&v=4",
5455
redirectTo = "NO_REDIRECT",
5556
)
56-
)
57+
),
5758
)
5859
}.getOrElse {
5960
logger.error("[DenyQuizFacade] Cannot decrease point. userId: \"${notApprovedQuiz.userId}\", point: \"$CREATE_QUIZ_PRICE\"", it)

src/main/kotlin/org/gitanimals/quiz/app/InboxApi.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ package org.gitanimals.quiz.app
22

33
import org.gitanimals.inbox.domain.InboxType
44
import org.springframework.web.bind.annotation.RequestBody
5+
import org.springframework.web.bind.annotation.RequestParam
56
import org.springframework.web.service.annotation.PostExchange
67
import java.time.Instant
78

89
fun interface InboxApi {
910

1011
@PostExchange("/internals/inboxes")
11-
fun inputInbox(@RequestBody request: InboxInputRequest)
12+
fun inputInbox(@RequestParam("userId") userId: Long, @RequestBody request: InboxInputRequest)
1213

1314
data class InboxInputRequest(
1415
val inboxData: InboxData,

src/main/kotlin/org/gitanimals/quiz/infra/hibernate/QuizSolveContextDoneHibernateEventListener.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ class QuizSolveContextDoneLogicDelegator(
6969
)
7070
}.onSuccess {
7171
inboxApi.inputInbox(
72-
InboxInputRequest(
72+
userId = event.userId,
73+
request = InboxInputRequest(
7374
publisher = InboxInputRequest.Publisher(
7475
publisher = "QUIZ",
7576
publishedAt = clock.instant(),
@@ -82,7 +83,7 @@ class QuizSolveContextDoneLogicDelegator(
8283
image = "https://avatars.githubusercontent.com/u/171903401?s=200&v=4",
8384
redirectTo = "NO_REDIRECT",
8485
)
85-
)
86+
),
8687
)
8788
}.onFailure {
8889
logger.error(

0 commit comments

Comments
 (0)