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

This commit is contained in:
usbharu 2023-08-08 17:46:08 +09:00
parent 58e301cf71
commit b79667cda6
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
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)
call.respond(HttpStatusCode.NoContent)
}
delete {
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()
?: throw ParameterNotExistException("Parameter(id='postsId') does not exist.")
reactionService.removeReaction(userId, postId)
call.respond(HttpStatusCode.NoContent)
}
}
}