From 2a8c1d70518070c7a307998f56279d67c2361680 Mon Sep 17 00:00:00 2001 From: nocode Date: Thu, 18 Jul 2024 13:35:38 +0700 Subject: [PATCH] Add grant api login --- Modules/Agents/Services/AgentService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/Agents/Services/AgentService.php b/Modules/Agents/Services/AgentService.php index adc7eea..ab1d22b 100644 --- a/Modules/Agents/Services/AgentService.php +++ b/Modules/Agents/Services/AgentService.php @@ -293,6 +293,10 @@ class AgentService if (strtolower($upGrant) != strtolower($input['up_grant'])) continue; // skip } + if (!empty($input['agents_code'])) { // if existing up_geant + if (strtolower($vAgent->code) != strtolower($input['agents_code'])) + continue; // skip + } // lay danh sach 2 con cua parent $processPath = $this->processParentPath($agentId, $vAgent->parent_path); if (!empty($processPath) && in_array($vAgent->agent_id, $processPath)) {