mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 16:06:15 +00:00
don't remove templateresponse
This commit is contained in:
parent
363777c2a6
commit
08efd41e8d
@ -22,6 +22,14 @@ namespace OCA\OcSms\AppInfo;
|
|||||||
$application = new Application();
|
$application = new Application();
|
||||||
|
|
||||||
$application->registerRoutes($this, array('routes' => array(
|
$application->registerRoutes($this, array('routes' => array(
|
||||||
array('name' => 'sms#index', 'url' => '/', 'verb' => 'GET'),
|
//array('name' => 'sms#index', 'url' => '/', 'verb' => 'GET'),
|
||||||
array('name' => 'sms#push', 'url' => '/push', 'verb' => 'POST'),
|
array('name' => 'sms#push', 'url' => '/push', 'verb' => 'POST'),
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
OC_API::register(
|
||||||
|
'get',
|
||||||
|
'/push',
|
||||||
|
array('\OCA\OcSms\Controller\SmsController', 'push'),
|
||||||
|
'ocsms',
|
||||||
|
OC_API::USER_AUTH
|
||||||
|
);
|
||||||
|
@ -13,6 +13,7 @@ namespace OCA\OcSms\Controller;
|
|||||||
|
|
||||||
|
|
||||||
use \OCP\IRequest;
|
use \OCP\IRequest;
|
||||||
|
use \OCP\AppFramework\Http\TemplateResponse;
|
||||||
use \OCP\AppFramework\Controller;
|
use \OCP\AppFramework\Controller;
|
||||||
use \OCP\AppFramework\Http\JSONResponse;
|
use \OCP\AppFramework\Http\JSONResponse;
|
||||||
use \OCA\OcSms\Db\SmsMapper;
|
use \OCA\OcSms\Db\SmsMapper;
|
||||||
@ -21,7 +22,6 @@ class SmsController extends Controller {
|
|||||||
|
|
||||||
private $userId;
|
private $userId;
|
||||||
private $smsMapper;
|
private $smsMapper;
|
||||||
// TMP
|
|
||||||
private $errorMsg;
|
private $errorMsg;
|
||||||
|
|
||||||
public function __construct($appName, IRequest $request, $userId, SmsMapper $mapper){
|
public function __construct($appName, IRequest $request, $userId, SmsMapper $mapper){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user