Implement comment constitution
fix bugs
This commit is contained in:
@@ -11,7 +11,7 @@ import io.ktor.locations.KtorExperimentalLocationsAPI
|
||||
import io.ktor.locations.Location
|
||||
import io.ktor.locations.get
|
||||
import io.ktor.locations.post
|
||||
import io.ktor.request.receive
|
||||
import io.ktor.request.receiveText
|
||||
import io.ktor.response.respond
|
||||
import io.ktor.routing.Route
|
||||
import fr.dcproject.entity.Article as ArticleEntity
|
||||
@@ -37,7 +37,7 @@ fun Route.commentArticle(repo: CommentArticleRepository) {
|
||||
post<CommentArticlePaths.ArticleCommentRequest> {
|
||||
assertCan(CREATE, it.article)
|
||||
|
||||
val content = call.receive<String>()
|
||||
val content = call.receiveText()
|
||||
val comment = CommentEntity(
|
||||
target = it.article,
|
||||
createdBy = citizen,
|
||||
|
||||
Reference in New Issue
Block a user