Skip to content

Commit ba71202

Browse files
committed
fix: types
1 parent 6b684dd commit ba71202

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/app/api/collections/[handle]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export async function GET(
3939
"products.variants.options",
4040
"products.tags",
4141
],
42-
take: limit || 100,
43-
skip: page || 0,
42+
take: parseInt(limit) || 100,
43+
skip: parseInt(page) || 0,
4444
})
4545

4646
if (!products) {

src/app/api/collections/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export async function GET(request: NextRequest) {
1010
const [collections, count] = await productService.listAndCountCollections(
1111
{},
1212
{
13-
skip: offset || 0,
13+
skip: parseInt(offset) || 0,
1414
take: 100,
1515
}
1616
)

src/app/api/products/[handle]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function GET(
2323
"description",
2424
"collection",
2525
],
26-
take: limit || 100,
26+
take: parseInt(limit) || 100,
2727
}
2828
)
2929

src/app/api/products/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export async function GET(request: NextRequest) {
1919

2020
const [data, count] = await productService.listAndCount(filters, {
2121
relations: ["variants", "variants.options", "tags"],
22-
take: limit || 100,
23-
skip: offset || 0,
22+
take: parseInt(limit) || 100,
23+
skip: parseInt(offset) || 0,
2424
})
2525

2626
const productsWithPrices = await getPrices(data, cart_id)

0 commit comments

Comments
 (0)