From 10f31db71375bafb806ddeff270cecf775370345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Wed, 12 May 2021 17:36:17 +0200 Subject: [PATCH] Set back the set-admin command to id --- flexiapi/app/Console/Commands/SetAccountAdmin.php | 6 +++--- flexisip-account-manager.spec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flexiapi/app/Console/Commands/SetAccountAdmin.php b/flexiapi/app/Console/Commands/SetAccountAdmin.php index 27b8010..09be8cd 100644 --- a/flexiapi/app/Console/Commands/SetAccountAdmin.php +++ b/flexiapi/app/Console/Commands/SetAccountAdmin.php @@ -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; } diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index 04ea292..22355e8 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -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