This commit is contained in:
parent
2b0ab1816f
commit
d51c9fc120
|
@ -39,8 +39,8 @@ module.exports = Self => {
|
|||
const xmlString = response.data;
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
|
||||
const [resultElement] = xmlDoc.getElementsByTagName('Mensaje');
|
||||
const resultElement = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
|
||||
|
||||
return resultElement.textContent;
|
||||
return resultElement;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -42,7 +42,8 @@ module.exports = Self => {
|
|||
throw new UserError(`Some mrwConfig parameters are not set`);
|
||||
|
||||
const query =
|
||||
`SELECT CASE co.code
|
||||
`SELECT
|
||||
CASE co.code
|
||||
WHEN 'ES' THEN a.postalCode
|
||||
WHEN 'PT' THEN LEFT(a.postalCode, 4)
|
||||
WHEN 'AD' THEN REPLACE(a.postalCode, 'AD', '00')
|
||||
|
|
Loading…
Reference in New Issue