public function rules() { $rules = parent::rules(); $rules[Controller::ALL] = ['response_type' => 'application/json', 'roles' => [Controller::REQUIRED_LOGIN], 'methods' => ['post']]; $rules['load'] = ['response_type' => 'application/json', 'roles' => [Controller::ALL], 'methods' => ['get']]; $rules['loadReplies'] = ['response_type' => 'application/json', 'roles' => [Controller::ALL], 'methods' => ['get']]; $rules['create'] = ['response_type' => 'application/json', 'roles' => [Controller::REQUIRED_LOGIN], 'methods' => ['post']]; $rules['upvote'] = ['response_type' => 'application/json', 'roles' => [Controller::REQUIRED_LOGIN], 'methods' => ['post']]; $rules['unvote'] = ['response_type' => 'application/json', 'roles' => [Controller::REQUIRED_LOGIN], 'methods' => ['post']]; return $rules; }