From cbca983d8bde8ce8756a2eac8973202cd8d5f7e5 Mon Sep 17 00:00:00 2001 From: Marc Michalsky forumZFD Date: Tue, 29 Sep 2020 14:13:55 +0200 Subject: [PATCH] add project title to result array and change "update" to "fetched" later it might become handy to distinguish the update direction (from Twingle to CiviCRM or to Twingle from CiciCRM ) --- api/v3/TwingleSync/models/TwingleProject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/v3/TwingleSync/models/TwingleProject.php b/api/v3/TwingleSync/models/TwingleProject.php index b17260a..c9df4a6 100644 --- a/api/v3/TwingleSync/models/TwingleProject.php +++ b/api/v3/TwingleSync/models/TwingleProject.php @@ -84,6 +84,7 @@ class TwingleProject { $this->id = $result['id']; $this->timestamp = $result['last_update']; return [ + 'title' => $this->values['title'], 'id' => $this->id, 'project_id' => $this->values['id'], 'state' => 'created', @@ -91,6 +92,7 @@ class TwingleProject { } // Give information back if project already exists return [ + 'title' => $this->values['title'], 'id' => is_array($this->id) ? implode(', ', $this->id) : $this->id, 'project_id' => $this->values['id'], 'state' => 'exists', @@ -112,7 +114,7 @@ class TwingleProject { 'title' => $this->values['title'], 'id' => $this->id, 'project_id' => $this->values['id'], - 'state' => 'updated', + 'state' => 'fetched', ]; }