From 11aa1b8ab4e650bc7893a7b4ea03b851f9ee8fda Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Fri, 20 Sep 2019 15:45:54 +0200 Subject: [PATCH] fix addErrors and remove debug code --- src/config/configBus.js | 1 - src/data/request/fetchFromEndpoint.js | 2 +- src/data/request/getDefaultRequestParameters.js | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/config/configBus.js b/src/config/configBus.js index 36e20410..d1bf4898 100644 --- a/src/config/configBus.js +++ b/src/config/configBus.js @@ -309,7 +309,6 @@ export const createConfigBus = () => { * @param {Array} errors - Errors to add. */ addErrors(errors) { - console.log(errors); if (!errors.length) { return; } diff --git a/src/data/request/fetchFromEndpoint.js b/src/data/request/fetchFromEndpoint.js index 0031a24a..5614972a 100644 --- a/src/data/request/fetchFromEndpoint.js +++ b/src/data/request/fetchFromEndpoint.js @@ -36,7 +36,7 @@ export async function fetchFromEndpoint(endpoint, options = {}) { response = await client[endpoint][options.method](options.params); } catch (e) { if (e.errors.length) { - configBus.addErrors(endpoint, e.errors); + configBus.addErrors(e.errors); configBus.$emit(ERROR, { [endpoint]: e.errors }); } } diff --git a/src/data/request/getDefaultRequestParameters.js b/src/data/request/getDefaultRequestParameters.js index 59c8e6ad..160fbd2d 100644 --- a/src/data/request/getDefaultRequestParameters.js +++ b/src/data/request/getDefaultRequestParameters.js @@ -42,9 +42,6 @@ export const getDefaultRequestParameters = () => { return; } - if (configBus.currentCarrier === 'dpd') { - delete addressValues.postal_code; - } parameters[key] = addressValues[key]; } });