Skip to content

Commit

Permalink
removing the usage of spread operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratik Shah committed Oct 31, 2017
1 parent e6ed23e commit fdf3829
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions refapp/stride.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ function factory({clientId, clientSecret, env = 'development', debugId = 'stride

request(options, (err, response, body) => {
if (err) {
logger.error(`! ${debugId}: request failed! details =`, prettify_json({...logDetails, err}))
logger.error(`! ${debugId}: request failed! details =`, prettify_json({logDetails, err}))
return reject(err)
}

if (!response || response.statusCode >= 399) {
logger.error(`! ${debugId}: request failed with an error response! details =`, prettify_json({...logDetails, responseBody: response.body, err}))
logger.error(`! ${debugId}: request failed with an error response! details =`, prettify_json({logDetails, responseBody: response.body, err}))
return reject(new Error('Request failed'))
}

Expand Down Expand Up @@ -581,7 +581,7 @@ function factory({clientId, clientSecret, env = 'development', debugId = 'stride
const userId = jwt.decoded.sub

logDetails = {
...logDetails,
logDetails,
cloudId,
conversationId,
userId,
Expand All @@ -591,7 +591,7 @@ function factory({clientId, clientSecret, env = 'development', debugId = 'stride
// Continue with the rest of the call chain
next()
} catch (err) {
logger.warn(`! ${debugId}: Invalid JWT:` + err.message, prettify_json({...logDetails, err}))
logger.warn(`! ${debugId}: Invalid JWT:` + err.message, prettify_json({logDetails, err}))
// a rogue call not frow a legitimate Stride client?
res.sendStatus(403)
}
Expand Down

0 comments on commit fdf3829

Please sign in to comment.