added trailing slash to post routes and updated routes in JS