mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Set back the set-admin command to id
This commit is contained in:
parent
95ff7bc06c
commit
10f31db713
2 changed files with 4 additions and 4 deletions
|
|
@ -26,7 +26,7 @@ use App\Admin;
|
|||
|
||||
class SetAccountAdmin extends Command
|
||||
{
|
||||
protected $signature = 'accounts:set-admin {sip}';
|
||||
protected $signature = 'accounts:set-admin {id}';
|
||||
protected $description = 'Give the admin role to an account';
|
||||
|
||||
public function __construct()
|
||||
|
|
@ -36,7 +36,7 @@ class SetAccountAdmin extends Command
|
|||
|
||||
public function handle()
|
||||
{
|
||||
$account = Account::withoutGlobalScopes()->sip($this->argument('sip'))->first();
|
||||
$account = Account::withoutGlobalScopes()->where('id', $this->argument('id'))->first();
|
||||
|
||||
if (!$account) {
|
||||
$this->error('Account not found, please use an existing SIP address');
|
||||
|
|
@ -47,7 +47,7 @@ class SetAccountAdmin extends Command
|
|||
$admin->account_id = $account->id;
|
||||
$admin->save();
|
||||
|
||||
$this->info('Account '.$this->argument('sip').' is now admin');
|
||||
$this->info('Account '.$account->identifier.' is now admin');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#%define _datadir %{_datarootdir}
|
||||
#%define _docdir %{_datadir}/doc
|
||||
|
||||
%define build_number 73
|
||||
%define build_number 74
|
||||
%define var_dir /var/opt/belledonne-communications
|
||||
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue