fix: pagination for stays

This commit is contained in:
Christel Westerberg
2024-06-18 13:20:00 +02:00
parent 9931d9edef
commit d50df09436
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import { z } from "zod"
export const staysInput = z
.object({
cursor: z.string().optional(),
cursor: z.number().optional(),
limit: z.number().min(0).default(6),
})
.default({})

View File

@@ -87,7 +87,7 @@ export const userQueryRouter = router({
params.set("limit", limit.toString())
if (cursor) {
params.set("offset", cursor)
params.set("offset", cursor.toString())
}
const apiResponse = await api.get(
@@ -148,7 +148,7 @@ export const userQueryRouter = router({
params.set("limit", limit.toString())
if (cursor) {
params.set("offset", cursor)
params.set("offset", cursor.toString())
}
const apiResponse = await api.get(