From 9e1dcf21dc5d65bcc4195f1ae4caedbe57835415 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 21 Jul 2014 20:32:12 -0230 Subject: Improve webhooks to call external url on task creation/modification --- app/Event/ProjectModificationDate.php | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 app/Event/ProjectModificationDate.php (limited to 'app/Event/ProjectModificationDate.php') diff --git a/app/Event/ProjectModificationDate.php b/app/Event/ProjectModificationDate.php new file mode 100644 index 00000000..8fbaee73 --- /dev/null +++ b/app/Event/ProjectModificationDate.php @@ -0,0 +1,53 @@ +project = $project; + } + + /** + * Execute the action + * + * @access public + * @param array $data Event data dictionary + * @return bool True if the action was executed or false when not executed + */ + public function execute(array $data) + { + if (isset($data['project_id'])) { + $this->project->updateModificationDate($data['project_id']); + return true; + } + + return false; + } +} -- cgit v1.2.3