Open lyongdee opened 6 years ago
how to get response data when $obj->create()?
ScriptTagService.php
public function update(ScriptTag $scriptTag) { $data = $scriptTag->exportData(); $response = $this->request( '/admin/script_tags/'.$scriptTag->id.'.json', 'PUT', array( 'script_tag' => $data ) ); $scriptTag->setData($response['script_tag']); }
Fix:
public function create(ScriptTag &$scriptTag) { $data = $scriptTag->exportData(); $response = $this->request( '/admin/script_tags.json', 'POST', array( 'script_tag' => $data ) ); //$scriptTag->setData($response['script_tag']); return $response['script_tag']; }
how to get response data when $obj->create()?
Fix: