fix: add debugAdd response axios
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2024-11-28 11:53:42 +01:00
parent 5923916cda
commit e730b5d4a1
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ module.exports = Self => {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipmentResponse', xmlDoc]);
const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
return result.toLowerCase().includes('se ha cancelado correctamente');
};