Changed methods for updating and creating new post

Methods created