complete 'addPost' function in 'Post' model