* Finish task#44172,task#44273.
This commit is contained in:
@@ -24,6 +24,32 @@ class webhookModel extends model
|
||||
return $webhook;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a webhook by type.
|
||||
*
|
||||
* @param int $type
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByType($type)
|
||||
{
|
||||
$webhook = $this->dao->select('*')->from(TABLE_WEBHOOK)->where('type')->eq($type)->fetch();
|
||||
return $webhook;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a webhook by type.
|
||||
*
|
||||
* @param int $type
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getBindAccount($webhookID, $webhookType, $openID)
|
||||
{
|
||||
$account = $this->dao->select('account')->from(TABLE_OAUTH)->where('providerID')->eq($webhookID)->andWhere('providerType')->eq($webhookType)->andWhere('openID')->eq($openID)->fetch('account');
|
||||
return $account;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get webhook list.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user