Merge pull request #39 from AAVikings/master

Removing logger logs for now
This commit is contained in:
benme authored and GitHub committed 2019-02-15 10:38:29 -03:00
commit e799e3dd3d
2 files changed
+3 -12

No files matched your search

+3 -8
View File
@@ -1,13 +1,10 @@
const axios = require('axios')
const appRoot = require('app-root-path')
const { logger } = require(`${appRoot}/utils/logger`)
const auth = require(`${appRoot}/utils/auth`)
exports.updateExecutionResults = async function (summaryDate, buyAverage, sellAverage,
marketRate, combinedProfitsA, combinedProfitsB) {
logger.debug('updateExecutionResults -> Entering Function.')
try {
const accessToken = await auth.authenticate()
@@ -50,12 +47,10 @@ exports.updateExecutionResults = async function (summaryDate, buyAverage, sellAv
}
})
if (!operationsResponse.data.errors)
logger.debug('updateExecutionResults -> Operations Module Response: %s', operationsResponse.data.data.operations_UpdateExecutionSummary)
else throw new Error(operationsResponse.data.errors[0].message)
if (operationsResponse.data.errors)
throw new Error(operationsResponse.data.errors[0].message)
} catch (error) {
logger.error('updateExecutionResults -> Error: ' + error.stack)
throw new Error('There has been an error updating the execution report: ' + error)
throw new Error('There has been an error updating the execution on the clone: ' + error)
}
}
-4
View File
@@ -1,12 +1,9 @@
const axios = require('axios')
const appRoot = require('app-root-path')
const { logger } = require(`${appRoot}/utils/logger`)
exports.authenticate = async function () {
try {
if (!global.ACCESS_TOKEN) {
logger.debug('authenticate -> Entering Function.')
const authBody = '{"client_id":"' + process.env.AUTH_CLIENT_ID
+ '","client_secret": "' + process.env.AUTH_CLIENT_SECRET
@@ -33,7 +30,6 @@ exports.authenticate = async function () {
return global.ACCESS_TOKEN
} catch (error) {
logger.error('authenticate -> Error: ' + error.stack)
throw new Error('There has been an error on the authentication: ' + error)
}
}