only POST new/changed data to the API when saving (#2)
This commit is contained in:
@@ -4,8 +4,10 @@ namespace JHodges\GiteaBot;
|
||||
class GiteaData{
|
||||
|
||||
protected $data=null;
|
||||
protected $newData=null;
|
||||
|
||||
public function __construct($data=null){
|
||||
$this->newData=new stdClass();
|
||||
if(!$data){
|
||||
$data=new stdClass();
|
||||
}
|
||||
@@ -14,6 +16,7 @@ class GiteaData{
|
||||
|
||||
public function __set($k,$v){
|
||||
$this->data->$k=$v;
|
||||
$this->newData->$k=$v;
|
||||
}
|
||||
|
||||
public function __get($k){
|
||||
|
Reference in New Issue
Block a user