generated posts controller and added routes