Updated CSV code to be less janky / be a bit more secure. #214
Updated CSV code to be less janky / be a bit more secure. #214DhritiKohli merged 3 commits intomainfrom
Conversation
|
In analysis.js, most of the code for the route for transformers.js is identical to the route for processTransformers.js. The only difference is this line: where the route for processTransformers.js references the template2 property. All of the code after this is the same. We should decompose all of that code into a function that is called from both routes. This will make it easier to maintain this code in the future. |
I will look into that. |
So, what did I do exactly? Well, the old code was bad / janky because it sent the code we needed to send it through a middle-man file as a .global function. That is not a good idea for multiple reasons. Now, instead of doing that, I made it so that it has its own end-point from its file so that it can be called from where the CSV code is, which actually sends it normally and does not require jank!