Updated http handlers in controller.js