updating post controller to use Firebase methods