return votes after vote

This commit is contained in:
2019-09-20 22:42:50 +02:00
parent 2311d3986e
commit a37afc1ada
6 changed files with 41 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ fun Route.voteArticle(repo: VoteArticleRepository) {
createdBy = this.citizen
)
assertCan(CREATE, vote)
repo.vote(vote)
call.respond(HttpStatusCode.Created)
val votes = repo.vote(vote)
call.respond(HttpStatusCode.Created, votes)
}
}