4 ms·
What impedes readability here is that you don't simply have an async function `getProfiles({ userId })` that gives you a list of profiles, either taking a callb
by always_good 10y ago
What impedes readability here is that you don't simply have an async function `getProfiles({ userId })` that gives you a list of profiles, either taking a callback or returning a promise.
A lot of that is pointless noise. You don't need to set the status code to 200 or call end(). `res.json(profiles)` will do.
And these days, Coffeescript is just Javascript with some optional parens. Can't think of many upsides in 2017 to not just using ES6.