mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fix FLEXIAPI-363 Send the Redis publish event when the externalAccount is...
This commit is contained in:
parent
8882cdab18
commit
0578125f70
4 changed files with 15 additions and 7 deletions
|
|
@ -68,6 +68,7 @@ v2.0
|
|||
- Fix FLEXIAPI-360 Add rules on some jobs to only run them in the Gitlab pipeline when needed
|
||||
- Fix FLEXIAPI-362 Return an empty object and not an empty array in the vcards-storage index endpoint to prevent some parsing issues in the clients
|
||||
- Fix FLEXIAPI-312 Add Redis publish event when updating the externalAccount to ping the Flexisip B2BUA
|
||||
- Fix FLEXIAPI-363 Send the Redis publish event when the externalAccount is deleted to ping the Flexisip B2BUA
|
||||
|
||||
v1.6
|
||||
----
|
||||
|
|
|
|||
|
|
@ -50,17 +50,14 @@ class ExternalAccountController extends Controller
|
|||
|
||||
public function delete(int $accountId)
|
||||
{
|
||||
$account = Account::findOrFail($accountId);
|
||||
|
||||
return view('admin.account.external.delete', [
|
||||
'account' => $account
|
||||
'account' => Account::findOrFail($accountId)
|
||||
]);
|
||||
}
|
||||
|
||||
public function destroy(int $accountId)
|
||||
{
|
||||
$account = Account::findOrFail($accountId);
|
||||
$account->external->delete();
|
||||
(new AccountService)->deleteExternalAccount($accountId);
|
||||
|
||||
return redirect()->route('admin.account.show', $account->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ class ExternalAccountController extends Controller
|
|||
|
||||
public function destroy(int $accountId)
|
||||
{
|
||||
$account = Account::findOrFail($accountId);
|
||||
return $account->external->delete();
|
||||
return (new AccountService)->deleteExternalAccount($accountId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -457,4 +457,15 @@ class AccountService
|
|||
|
||||
return $externalAccount;
|
||||
}
|
||||
|
||||
public function deleteExternalAccount(int $accountId)
|
||||
{
|
||||
$account = Account::findOrFail($accountId);
|
||||
$externalAccount = $account->external;
|
||||
|
||||
if ($externalAccount) {
|
||||
(new FlexisipRedisConnector)->pingB2BUA($externalAccount);
|
||||
return $externalAccount->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue