Skip to content

Commit

Permalink
[REF. #67] Bugfix: 'YnhServer::stopMonitoringAsset' was creating a ne…
Browse files Browse the repository at this point in the history
…w asset instead of removing an existing one.
  • Loading branch information
csavelief committed Sep 16, 2024
1 parent 882ba17 commit c2c3ba0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Models/YnhServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use App\Helpers\SshConnection2;
use App\Helpers\SshKeyPair;
use App\Modules\AdversaryMeter\Events\CreateAsset;
use App\Modules\AdversaryMeter\Events\DeleteAsset;
use App\Traits\HasTenant2;
use App\User;
use Carbon\Carbon;
Expand Down Expand Up @@ -353,7 +354,7 @@ public function startMonitoringAsset(User $user, string $domainOrIpAddress): boo

public function stopMonitoringAsset(User $user, string $domainOrIpAddress): bool
{
event(new CreateAsset($user, $domainOrIpAddress));
event(new DeleteAsset($user, $domainOrIpAddress));
return true;
}

Expand Down

0 comments on commit c2c3ba0

Please sign in to comment.