Add validation on Constitution routes

This commit is contained in:
2021-04-10 23:45:16 +02:00
parent 0c8bcbd634
commit 6a5e00bb4d
7 changed files with 120 additions and 17 deletions

View File

@@ -6,9 +6,6 @@ interface PaginatedRequestI {
}
open class PaginatedRequest(
page: Int = 1,
limit: Int = 50
) : 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
}
override val page: Int = 1,
override val limit: Int = 50
) : PaginatedRequestI