Merge pull request #39 from AAVikings/master
Removing logger logs for now
This commit is contained in:
2 files changed
+3
-12
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user