mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Add template response, we will do tests by this interface
This commit is contained in:
parent
5d1112f677
commit
445dc8abcf
@ -22,5 +22,6 @@ namespace OCA\OcSms\AppInfo;
|
||||
$application = new Application();
|
||||
|
||||
$application->registerRoutes($this, array('routes' => array(
|
||||
array('name' => 'sms#push', 'url' => '/push', 'verb' => 'GET'),
|
||||
array('name' => 'sms#index', 'url' => '/', 'verb' => 'GET'),
|
||||
array('name' => 'sms#push', 'url' => '/push', 'verb' => 'POST'),
|
||||
)));
|
||||
|
@ -25,7 +25,13 @@ class SmsController extends Controller {
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
public function push($json_datas) {
|
||||
public function index() {
|
||||
$templateName = 'main'; // will use templates/main.php
|
||||
$parameters = array('key' => 'hi');
|
||||
return new TemplateResponse($this->appName, $templateName, $parameters);
|
||||
}
|
||||
|
||||
public function push($json_datas) {
|
||||
var_dump($json_datas);
|
||||
return array("test" => "test2");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user