Implemented create and update actions on Posts