mirror of https://github.com/usbharu/Hideout.git
fix: リアクションAPIのレスポンス指定忘れを修正
This commit is contained in:
parent
377a73a878
commit
474680bd2a
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue