Lint project

This commit is contained in:
2019-10-10 22:50:24 +02:00
parent 194620e15b
commit f76f6f83bb
36 changed files with 81 additions and 118 deletions

View File

@@ -56,7 +56,7 @@ fun Route.comment(repo: CommentRepository) {
put<CommentPaths.CommentRequest> {
val comment = repo.findById(it.comment)!!
assertCan(UPDATE,comment)
assertCan(UPDATE, comment)
comment.content = call.receiveText()
repo.edit(comment)

View File

@@ -8,7 +8,7 @@ interface PaginatedRequestI {
open class PaginatedRequest(
page: Int = 1,
limit: Int = 50
): PaginatedRequestI {
) : PaginatedRequestI {
override val page: Int = if (page < 1) 1 else page
override val limit: Int = if (limit > 50) 50 else if (limit < 1) 1 else limit
}

View File

@@ -41,7 +41,7 @@ object VoteArticlePaths {
page: Int = 1,
limit: Int = 50,
val search: String? = null
): PaginatedRequestI by PaginatedRequest(page, limit)
) : PaginatedRequestI by PaginatedRequest(page, limit)
@Location("/citizens/{citizen}/votes")
class CitizenVotesByIdsRequest(val citizen: Citizen, id: List<String>) {