fix: リアクションAPIのレスポンス指定忘れを修正

This commit is contained in:
usbharu 2023-08-08 17:46:08 +09:00
parent 377a73a878
commit 474680bd2a
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,7 @@ fun Route.posts(postApiService: IPostApiService, reactionService: IReactionServi
} }
reactionService.sendReaction(reaction.reaction ?: "", userId, postId) reactionService.sendReaction(reaction.reaction ?: "", userId, postId)
call.respond(HttpStatusCode.NoContent)
} }
delete { delete {
val jwtPrincipal = call.principal<JWTPrincipal>() ?: throw IllegalStateException("no principal") val jwtPrincipal = call.principal<JWTPrincipal>() ?: throw IllegalStateException("no principal")
@ -57,6 +58,7 @@ fun Route.posts(postApiService: IPostApiService, reactionService: IReactionServi
val postId = call.parameters["id"]?.toLong() val postId = call.parameters["id"]?.toLong()
?: throw ParameterNotExistException("Parameter(id='postsId') does not exist.") ?: throw ParameterNotExistException("Parameter(id='postsId') does not exist.")
reactionService.removeReaction(userId, postId) reactionService.removeReaction(userId, postId)
call.respond(HttpStatusCode.NoContent)
} }
} }
} }