changed the routes.rb to reflect constraints and made the URL consistewnt on the app.js file to reflect the new api constrained URL