(refactor) refactor syntax in routes.js