mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-25 07:05:39 +00:00
Move settings from smscontroller to dedicated controller
This commit is contained in:
@@ -16,6 +16,7 @@ namespace OCA\OcSms\AppInfo;
|
||||
use \OCP\AppFramework\App;
|
||||
|
||||
use \OCA\OcSms\Controller\ApiController;
|
||||
use \OCA\OcSms\Controller\SettingsController;
|
||||
use \OCA\OcSms\Controller\SmsController;
|
||||
|
||||
use \OCA\OcSms\Db\Sms;
|
||||
@@ -72,6 +73,15 @@ class OcSmsApp extends App {
|
||||
/**
|
||||
* Controllers
|
||||
*/
|
||||
$container->registerService('SettingsController', function($c) use($app) {
|
||||
return new SettingsController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('ConfigMapper'),
|
||||
$app
|
||||
);
|
||||
});
|
||||
|
||||
$container->registerService('SmsController', function($c) use($app) {
|
||||
return new SmsController(
|
||||
$c->query('AppName'),
|
||||
|
||||
+4
-3
@@ -20,9 +20,10 @@ $application->registerRoutes($this, array('routes' => array(
|
||||
array('name' => 'sms#delete_conversation', 'url' => '/delete/conversation', 'verb' => 'POST'),
|
||||
array('name' => 'sms#check_new_messages', 'url' => '/get/new_messages', 'verb' => 'GET'),
|
||||
array('name' => 'sms#delete_message', 'url' => '/delete/message', 'verb' => 'POST'),
|
||||
array('name' => 'sms#set_country', 'url'=> '/set/country', 'verb' => 'POST'),
|
||||
array('name' => 'sms#get_settings', 'url'=> '/get/settings', 'verb' => 'GET'),
|
||||
array('name' => 'sms#set_messagelimit', 'url'=> '/set/msglimit', 'verb' => 'POST'),
|
||||
|
||||
array('name' => 'settings#set_country', 'url'=> '/set/country', 'verb' => 'POST'),
|
||||
array('name' => 'settings#get_settings', 'url'=> '/get/settings', 'verb' => 'GET'),
|
||||
array('name' => 'settings#set_messagelimit', 'url'=> '/set/msglimit', 'verb' => 'POST'),
|
||||
|
||||
array('name' => 'api#get_api_version', 'url' => '/get/apiversion', 'verb' => 'GET'), // Android APIv1
|
||||
array('name' => 'api#push', 'url' => '/push', 'verb' => 'POST'), // Android API
|
||||
|
||||
Reference in New Issue
Block a user