fac18 / week6-coda-squall

https://coda-squall.herokuapp.com/
0 stars 0 forks source link

Passing SQL response directly to browser #45

Open oliverjam opened 4 years ago

oliverjam commented 4 years ago

It looks like your /create-char route responds with the entire pg response as JSON. This could potentially be quite dangerous as you're exposing DB internals to anyone.

It's also just not necessary to send that much data back as a response—you only really need to send the rows property of data that the browser needs to render.