feature #7: check if comment content is realy edited

add somes tests
This commit is contained in:
2019-08-27 23:18:42 +02:00
parent 1fb0e39038
commit b5cb238061
5 changed files with 14 additions and 7 deletions

View File

@@ -94,7 +94,7 @@ open class Comment <T: UuidEntity>(override var requester: Requester): Repositor
.getFunction("edit_comment")
.sendQuery(
"reference" to reference,
"id" to comment.target.id,
"id" to comment.id,
"content" to comment.content
)
}

View File

@@ -38,7 +38,7 @@ fun Route.comment(repo: CommentRepository) {
assertCan(UPDATE,comment)
comment.content = call.receiveText()
repo.edit(comment as fr.dcproject.entity.Comment<UuidEntity>)
repo.edit(comment as CommentEntity<UuidEntity>)
call.respond(HttpStatusCode.OK, comment)
}

View File

@@ -9,5 +9,6 @@
</root>
<logger name="org.eclipse.jetty" level="INFO"/>
<logger name="com.github.jasync" level="WARN"/>
<logger name="fr.postgresjson" level="debug"/>
<logger name="io.netty" level="INFO"/>
</configuration>