diff --git a/interfaces/IItem/index.js b/interfaces/IItem/index.js index 322b859..75d11bd 100644 --- a/interfaces/IItem/index.js +++ b/interfaces/IItem/index.js @@ -12,7 +12,7 @@ class IItem extends ETInterface { url, qs: { app_id: appId, - sku: sku.toString(), + sku: sku ? sku.toString() : undefined, name, page, per_page: perPage, @@ -84,7 +84,7 @@ class IItem extends ETInterface { url, qs: { app_id: appId, - def_id_filter: defIdFilter.toString(), + def_id_filter: defIdFilter ? defIdFilter.toString() : undefined, index_by: indexBy, page, per_page: perPage @@ -110,7 +110,7 @@ class IItem extends ETInterface { const res = await this.request.get({ url, - qs: { app_id: appId, def_id: defId.toString() } + qs: { app_id: appId, def_id: defId ? defId.toString() : undefined } }) if (!res.response) { diff --git a/interfaces/ITrade/index.js b/interfaces/ITrade/index.js index 965e219..3479b0b 100644 --- a/interfaces/ITrade/index.js +++ b/interfaces/ITrade/index.js @@ -67,7 +67,14 @@ class ITrade extends ETInterface { const res = await this.request.get({ url, - qs: { uid, state, type, page, per_page: perPage, ids: ids.toString() } + qs: { + uid, + state, + type, + page, + per_page: perPage, + ids: ids ? ids.toString() : undefined + } }) if (!res.response) {