mirror of
https://github.com/usbharu/Hideout.git
synced 2026-07-22 13:13:54 +00:00
fix: リアクションAPIのレスポンス指定忘れを修正
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user