refactor post controller with before actions