feat: add hotel image
This commit is contained in:
@@ -80,10 +80,10 @@ export const userQueryRouter = router({
|
||||
stays: router({
|
||||
previous: protectedProcedure.input(staysInput).query(async (opts) => {
|
||||
try {
|
||||
const { limit: perPage, cursor } = opts.input
|
||||
const { limit, cursor } = opts.input
|
||||
|
||||
const params = new URLSearchParams()
|
||||
params.set("limit", perPage.toString())
|
||||
params.set("limit", limit.toString())
|
||||
|
||||
if (cursor) {
|
||||
params.set("offset", cursor.toString())
|
||||
@@ -114,6 +114,7 @@ export const userQueryRouter = router({
|
||||
|
||||
const apiJson = await apiResponse.json()
|
||||
if (!apiJson.data?.length) {
|
||||
console.error(`Get Previous Stays - No data found from api call`)
|
||||
throw internalServerError()
|
||||
}
|
||||
|
||||
@@ -143,10 +144,10 @@ export const userQueryRouter = router({
|
||||
|
||||
upcoming: protectedProcedure.input(staysInput).query(async (opts) => {
|
||||
try {
|
||||
const { limit: perPage, cursor } = opts.input
|
||||
const { limit, cursor } = opts.input
|
||||
|
||||
const params = new URLSearchParams()
|
||||
params.set("limit", perPage.toString())
|
||||
params.set("limit", limit.toString())
|
||||
|
||||
if (cursor) {
|
||||
params.set("offset", cursor.toString())
|
||||
@@ -177,6 +178,7 @@ export const userQueryRouter = router({
|
||||
|
||||
const apiJson = await apiResponse.json()
|
||||
if (!apiJson.data?.length) {
|
||||
console.error(`Get Upcoming Stays - No data found from api call`)
|
||||
throw internalServerError()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user