* Fix bugs.

This commit is contained in:
liugang
2017-10-25 15:06:47 +08:00
parent 51db6a81b9
commit 9375676a66
12 changed files with 65 additions and 53 deletions
+3 -3
View File
@@ -97,7 +97,7 @@ class webhook extends control
*/
public function delete($id)
{
$this->webhook->delete($id);
$this->webhook->delete(TABLE_WEBHOOK, $id);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success'));
@@ -149,8 +149,8 @@ class webhook extends control
if($webhook)
{
$contentType = zget($this->config->webhook->contentTypes, $webhook->contentType, 'application/json');
$httpCode = $this->webhook->fetchHook($contentType, $webhook->url, $data->data);
$this->saveLog($data->webhook, $data->action, $webhook->url, $contentType, $data->data, $httpCode);
$result = $this->webhook->fetchHook($contentType, $webhook->url, $data->data);
$this->saveLog($data->webhook, $data->action, $webhook->url, $contentType, $data->data, $result);
}
if($httpCode == 200) $this->dao->update(TABLE_WEBHOOKDATA)->set('status')->eq('sended')->where('id')->eq($data->id)->exec();