1
0
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:
Loïc Blot (@U-Exp) 2014-09-12 14:08:01 +02:00
parent 5d1112f677
commit 445dc8abcf
2 changed files with 9 additions and 2 deletions

View File

@ -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'),
)));

View File

@ -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");
}