'staff_2', 'requestData' => [ 'topicId' => [ 'validation' => DataValidator::dataStoreId('topic'), 'error' => ERRORS::INVALID_TOPIC ] ] ]; } public function handler() { $topic = Topic::getDataStore(Controller::request('topicId')); if(Controller::request('name')) { $topic->name = Controller::request('name'); } if(Controller::request('iconColor')) { $topic->iconColor = Controller::request('iconColor'); } if(Controller::request('icon')) { $topic->icon = Controller::request('icon'); } if (Controller::request('private') !== null) { $topic->private = Controller::request('private'); } $topic->store(); Response::respondSuccess(); } }