update tools for urls

This commit is contained in:
InsanusMokrassar 2020-08-31 00:51:48 +06:00
parent 9a5585957f
commit 14e0196c11

View File

@ -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<String, String?>.extractPagination: Pagination
get() = SimplePagination(
get("page") ?.toIntOrNull() ?: 0,