minor nit: you don't need `else`. you can just return `res.json`