mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-11 08:23:00 +00:00
ocsmsapp.php cleanup & fix
This commit is contained in:
@@ -17,20 +17,16 @@ use \OCP\AppFramework\Http;
|
||||
use \OCP\AppFramework\Controller;
|
||||
use \OCP\AppFramework\Http\JSONResponse;
|
||||
|
||||
use \OCA\OcSms\AppInfo\OcSmsApp;
|
||||
|
||||
use \OCA\OcSms\Db\SmsMapper;
|
||||
|
||||
class ApiController extends Controller {
|
||||
|
||||
private $app;
|
||||
private $userId;
|
||||
private $smsMapper;
|
||||
private $errorMsg;
|
||||
|
||||
public function __construct ($appName, IRequest $request, $userId, SmsMapper $mapper, OcSmsApp $app) {
|
||||
public function __construct ($appName, IRequest $request, $userId, SmsMapper $mapper) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->app = $app;
|
||||
$this->userId = $userId;
|
||||
$this->smsMapper = $mapper;
|
||||
}
|
||||
|
||||
@@ -17,20 +17,16 @@ use \OCP\AppFramework\Controller;
|
||||
use \OCP\AppFramework\Http\JSONResponse;
|
||||
use \OCP\AppFramework\Http;
|
||||
|
||||
use \OCA\OcSms\AppInfo\OcSmsApp;
|
||||
|
||||
use \OCA\OcSms\Db\ConfigMapper;
|
||||
|
||||
use \OCA\OcSms\Lib\CountryCodes;
|
||||
|
||||
class SettingsController extends Controller {
|
||||
|
||||
private $app;
|
||||
private $configMapper;
|
||||
|
||||
public function __construct ($appName, IRequest $request, ConfigMapper $cfgMapper, OcSmsApp $app){
|
||||
public function __construct ($appName, IRequest $request, ConfigMapper $cfgMapper){
|
||||
parent::__construct($appName, $request);
|
||||
$this->app = $app;
|
||||
$this->configMapper = $cfgMapper;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,14 +13,13 @@ namespace OCA\OcSms\Controller;
|
||||
|
||||
|
||||
use \OCP\IRequest;
|
||||
use \OCP\IURLGenerator;
|
||||
use \OCP\Contacts\IManager as IContactsManager;
|
||||
use \OCP\AppFramework\Http\TemplateResponse;
|
||||
use \OCP\AppFramework\Controller;
|
||||
use \OCP\AppFramework\Http\JSONResponse;
|
||||
use \OCP\AppFramework\Http;
|
||||
|
||||
use \OCA\OcSms\AppInfo\OcSmsApp;
|
||||
|
||||
use \OCA\OcSms\Db\ConfigMapper;
|
||||
use \OCA\OcSms\Db\SmsMapper;
|
||||
|
||||
@@ -29,17 +28,25 @@ use \OCA\OcSms\Lib\PhoneNumberFormatter;
|
||||
|
||||
class SmsController extends Controller {
|
||||
|
||||
private $app;
|
||||
private $userId;
|
||||
private $configMapper;
|
||||
private $smsMapper;
|
||||
private $urlGenerator;
|
||||
private $contactCache;
|
||||
|
||||
/**
|
||||
* SmsController constructor.
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param $userId
|
||||
* @param SmsMapper $mapper
|
||||
* @param ConfigMapper $cfgMapper
|
||||
* @param IContactsManager $contactsManager
|
||||
* @param $urlGenerator
|
||||
*/
|
||||
public function __construct ($appName, IRequest $request, $userId, SmsMapper $mapper, ConfigMapper $cfgMapper,
|
||||
IContactsManager $contactsManager, $urlGenerator, OcSmsApp $app) {
|
||||
IContactsManager $contactsManager, IURLGenerator $urlGenerator) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->app = $app;
|
||||
$this->userId = $userId;
|
||||
$this->smsMapper = $mapper;
|
||||
$this->configMapper = $cfgMapper;
|
||||
|
||||
Reference in New Issue
Block a user