unified post controller - create and update