Skip to content

Commit

Permalink
API: Stop ejs from messing with our production data
Browse files Browse the repository at this point in the history
🔥

Closes  DeviaVir#1174
  • Loading branch information
defkev committed Jan 30, 2018
1 parent 1e0063f commit fba0a5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions extensions/output/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ module.exports = function container (get) {

app.get('/', function (req, res) {
app.locals.moment = moment;
let datas = objectWithoutKey(tradeObject, 'options');
datas = objectWithoutKey(tradeObject);
let datas = JSON.parse(JSON.stringify(objectWithoutKey(tradeObject, 'options'))); // deep copy to prevent alteration
res.render('dashboard', datas);
});

Expand Down

0 comments on commit fba0a5a

Please sign in to comment.