mirror of
https://github.com/usbharu/Hideout.git
synced 2026-08-21 05:39:58 +00:00
fix: ページネーションのHTTPヘッダー変換のURL組み立て部分のバグを修正
This commit is contained in:
+3
-3
@@ -8,15 +8,15 @@ fun <T, ID> PaginationList<T, ID>.toHttpHeader(
|
|||||||
): String? {
|
): String? {
|
||||||
val mutableListOf = mutableListOf<String>()
|
val mutableListOf = mutableListOf<String>()
|
||||||
if (next != null) {
|
if (next != null) {
|
||||||
mutableListOf.add("<${nextBlock(nextBlock.toString())}>; rel=\"next\";")
|
mutableListOf.add("<${nextBlock(this.next.toString())}>; rel=\"next\"")
|
||||||
}
|
}
|
||||||
if (prev != null) {
|
if (prev != null) {
|
||||||
mutableListOf.add("<${prevBlock(prevBlock.toString())}>; rel=\"prev\";")
|
mutableListOf.add("<${prevBlock(this.prev.toString())}>; rel=\"prev\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mutableListOf.isEmpty()) {
|
if (mutableListOf.isEmpty()) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return mutableListOf.joinToString(",")
|
return mutableListOf.joinToString(", ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user