Using parseInt.

This commit is contained in:
Bradley Shellnut 2022-12-01 12:05:58 -08:00
parent ebb9b9d7b6
commit 45ddd0a286

View file

@ -14,7 +14,7 @@ export const load: PageServerLoad = () => {
} }
export const actions: Actions = { export const actions: Actions = {
default: async ({ request }): Promise<any> => { default: async ({ request }: RequestEvent): Promise<any> => {
console.log("In search action specific") console.log("In search action specific")
// Do things in here // Do things in here
const formData = await request.formData(); const formData = await request.formData();
@ -27,8 +27,8 @@ export const actions: Actions = {
const queryParams: SearchQuery = { const queryParams: SearchQuery = {
order_by: 'rank', order_by: 'rank',
ascending: false, ascending: false,
limit: +limit, limit: parseInt(limit),
skip: +skip, skip: parseInt(skip),
client_id: BOARD_GAME_ATLAS_CLIENT_ID, client_id: BOARD_GAME_ATLAS_CLIENT_ID,
fuzzy_match: true, fuzzy_match: true,
name: '' name: ''
@ -135,8 +135,8 @@ export const actions: Actions = {
return { return {
games, games,
totalCount, totalCount,
limit: +limit, limit: parseInt(limit),
skip: +skip, skip: parseInt(skip),
}; };
} }
} catch (e) { } catch (e) {