* finish task #3562.
This commit is contained in:
@@ -157,19 +157,20 @@ class webhook extends control
|
||||
return true;
|
||||
}
|
||||
|
||||
$now = helper::now();
|
||||
foreach($dataList as $data)
|
||||
{
|
||||
$webhook = zget($webhooks, $data->webhook, '');
|
||||
$webhook = zget($webhooks, $data->objectID, '');
|
||||
if($webhook)
|
||||
{
|
||||
$result = $this->webhook->fetchHook($webhook, $data->data);
|
||||
$this->webhook->saveLog($webhook, $data->action, $data->data, $result);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_WEBHOOKDATAS)->set('status')->eq('sended')->where('id')->eq($data->id)->exec();
|
||||
$this->dao->update(TABLE_NOTIFY)->set('status')->eq('sended')->set('sendTime')->eq($now)->where('id')->eq($data->id)->exec();
|
||||
}
|
||||
|
||||
$this->dao->delete()->from(TABLE_WEBHOOKDATAS)->where('status')->eq('sended')->exec();
|
||||
$this->dao->delete()->from(TABLE_NOTIFY)->where('status')->eq('sended')->exec();
|
||||
|
||||
echo "OK\n";
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user