Skip to content

Commit

Permalink
reverting process massage function
Browse files Browse the repository at this point in the history
  • Loading branch information
nikiwycherley committed Nov 28, 2023
1 parent 8dc4652 commit 20e46ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/functions/processMessage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

const xml2js = require('xml2js')
const moment = require('moment')
const AWSConfig = require('../../config/config.json').aws
const service = require('../helpers/service')
Expand All @@ -19,10 +20,9 @@ module.exports.processMessage = async (event) => {

// Add in the references field
const xmlMessage = event.bodyXml.replace('</scope>', '</scope>\n<references></references>')
const parseString = require('xml2js').parseString

const xmlResult = await new Promise((resolve, reject) => {
parseString(xmlMessage, function (err, value) {
xml2js.parseString(xmlMessage, (err, value) => {
if (err) return reject(err)
resolve(value)
})
Expand Down

0 comments on commit 20e46ee

Please sign in to comment.