async function addPost (userId, postId) {
  try {
    await
    userModel
      .findByIdAndUpdate(userId, { $push: { posts: postId } })
      .exec()
  } catch (error) { console.error(error) }
}
/*  find the user with the userId in DB
    and add the postId to the posts array */
find the user with the userId in DB
and add the postId to the posts array
find the user with the userId in DB and add the postId to the posts array
async function addPost (userId, postId) {
  try {
    await
    userModel
      .findByIdAndUpdate(userId, { $push: { posts: postId } })
      .exec()
  } catch (error) { console.error(error) }
}
async function addPost ( userId , postId ) { try { await userModel . findByIdAndUpdate ( userId , { $push : { posts : postId } } ) . exec ( ) } catch ( error ) { console . error ( error ) } }
find the user with the userId in DB
and add the postId to the posts array
find the user with the userId in DB and add the postId to the posts array