Added get_categories controller for JSON API calls