Updated posts controller

CRUD operations