From 9fe2c47452dafee508ad889847ea7b81aa43e2a7 Mon Sep 17 00:00:00 2001 From: Pontus Persson <39442866+PixelBoii@users.noreply.github.com> Date: Wed, 9 Feb 2022 15:02:18 +0100 Subject: [PATCH] feat: Support passing partial withdrawal filter options --- src/CSGOEmpire.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/CSGOEmpire.ts b/src/CSGOEmpire.ts index 5e0a1c9..6bf2f98 100644 --- a/src/CSGOEmpire.ts +++ b/src/CSGOEmpire.ts @@ -197,9 +197,16 @@ export default class CSGOEmpire { return res.data; } - async queryWithdrawItems(options: WithdrawalFilters = { per_page: 160, page: 1, price_max_above: 15, sort: 'desc', order: 'market_value' }, addNewItems: boolean = false) { + async queryWithdrawItems(options: WithdrawalFilters, addNewItems: boolean = false) { const res = await this.get('/trading/items', { - params: options + params: { + per_page: 160, + page: 1, + price_max_above: 15, + sort: 'desc', + order: 'market_value', + ...options, + } }); return new Shop(