Skip to content

Commit

Permalink
Added delDepletedClientsApi
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezax5 committed Apr 26, 2023
1 parent 98c526c commit 13b476e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Panel/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Base
'apiMHSanaei_list'=>'/xui/API/inbounds/list/',
'apiMHSanaei_get'=>'/xui/API/inbounds/get/{id}',
'apiMHSanaei_resetAllClientTraffics'=>'/xui/API/inbounds/resetAllClientTraffics/{id}',
'apiMHSanaei_delDepletedClients'=>'/xui/API/inbounds/delDepletedClients/{id}',
];
protected $defaults = [
'sniffing' => [
Expand Down Expand Up @@ -105,7 +106,7 @@ protected function getUrl($path): string

if (isset($this->path[$path])) {
$urlPath = $this->path[$path];
$arrPath = ['delInbound', 'inbound', 'updateInbound', 'installXray','delClient','clientIps','clearClientIps','apiMHSanaei_get','apiMHSanaei_resetAllClientTraffics'];
$arrPath = ['delInbound', 'inbound', 'updateInbound', 'installXray','delClient','clientIps','clearClientIps','apiMHSanaei_get','apiMHSanaei_resetAllClientTraffics','apiMHSanaei_delDepletedClients'];
$arrPathWithClient = ['resetClientTraffic'];
if (in_array($path, $arrPath)) {
$urlPath = strtr($this->path[$path], ['{id}' => $this->getId()]);
Expand Down
5 changes: 5 additions & 0 deletions src/Panel/MHSanaei.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,9 @@ public function resetAllClientTrafficsApi($id)
$this->setId($id);
return $this->curl('apiMHSanaei_resetAllClientTraffics', []);
}
public function delDepletedClientsApi($id)
{
$this->setId($id);
return $this->curl('apiMHSanaei_resetAllClientTraffics', []);
}
}

0 comments on commit 13b476e

Please sign in to comment.