Complete update function in post model