* Open webhook async mode.
This commit is contained in:
@@ -350,14 +350,12 @@ class webhook extends control
|
||||
if(empty($webhooks))
|
||||
{
|
||||
echo "NO WEBHOOK EXIST.\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
$dataList = $this->webhook->getDataList();
|
||||
if(empty($dataList))
|
||||
{
|
||||
echo "OK\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->webhook->setSentStatus(array_keys($dataList), 'senting');
|
||||
@@ -385,6 +383,5 @@ class webhook extends control
|
||||
$this->dao->delete()->from(TABLE_NOTIFY)->where('status')->eq('sended')->exec();
|
||||
|
||||
echo "OK\n";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ $(function()
|
||||
$('#type').change(function()
|
||||
{
|
||||
var type = $(this).val();
|
||||
$('#sendTypeTR').toggle(type != 'dinggroup' && type != 'dinguser' && type != 'wechatuser' && type != 'wechatgroup' && type != 'feishuuser' && type != 'feishugroup');
|
||||
//$('#sendTypeTR').toggle(type != 'dinggroup' && type != 'dinguser' && type != 'wechatuser' && type != 'wechatgroup' && type != 'feishuuser' && type != 'feishugroup');
|
||||
$('#secretTR').toggle(type == 'dinggroup' || type == 'feishugroup');
|
||||
$('#urlTR').toggle(type != 'dinguser' && type != 'wechatuser' && type != 'feishuuser');
|
||||
$('.dinguserTR').toggle(type == 'dinguser');
|
||||
|
||||
@@ -789,7 +789,7 @@ class webhookModel extends model
|
||||
$log->url = $webhook->url;
|
||||
$log->contentType = $webhook->contentType;
|
||||
$log->data = $data;
|
||||
$log->result = $result;
|
||||
$log->result = (string)$result;
|
||||
|
||||
$this->dao->insert(TABLE_LOG)->data($log)->exec();
|
||||
return !dao::isError();
|
||||
|
||||
@@ -91,13 +91,11 @@
|
||||
<td><?php echo html::input('domain', $webhook->domain, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if(strpos("dinggroup|dinguser|wechatgroup|wechatuser|feishuuser|feishugroup", $webhook->type) === false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->sendType;?></th>
|
||||
<td><?php echo html::select('sendType', $lang->webhook->sendTypeList, $webhook->sendType, "class='form-control'");?></td>
|
||||
<td><?php echo $lang->webhook->note->async;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->product;?></th>
|
||||
<td><?php echo html::select('products[]', $products, $webhook->products, "class='form-control chosen' multiple");?></td>
|
||||
|
||||
Reference in New Issue
Block a user