mirror of
https://github.com/usbharu/Hideout.git
synced 2026-08-26 07:40:52 +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)
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user