Update posts controller to always return json.