diff --git a/ktor/common/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/PaginationInUrl.kt b/ktor/common/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/PaginationInUrl.kt index fe957a2a..60cb0244 100644 --- a/ktor/common/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/PaginationInUrl.kt +++ b/ktor/common/src/commonMain/kotlin/com/insanusmokrassar/postssystem/ktor/PaginationInUrl.kt @@ -12,6 +12,12 @@ val Pagination.asUrlQueryParts "size" to size.toString() ) +val Pagination.asUrlQueryArrayParts + get() = arrayOf( + "page" to page.toString(), + "size" to size.toString() + ) + val Map.extractPagination: Pagination get() = SimplePagination( get("page") ?.toIntOrNull() ?: 0,