2021-08-21 10:58:00 +00:00
|
|
|
<?php
|
|
|
|
namespace OCA\UPschooling\Controller;
|
|
|
|
|
2021-08-21 14:00:48 +00:00
|
|
|
use OCP\AppFramework\Http\TextPlainResponse;
|
2021-08-21 10:58:00 +00:00
|
|
|
use OCP\IRequest;
|
|
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
|
|
use OCP\AppFramework\Http\DataResponse;
|
|
|
|
use OCP\AppFramework\Controller;
|
|
|
|
|
|
|
|
class PageController extends Controller {
|
|
|
|
private $userId;
|
|
|
|
|
|
|
|
public function __construct($AppName, IRequest $request, $UserId){
|
|
|
|
parent::__construct($AppName, $request);
|
|
|
|
$this->userId = $UserId;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* CAUTION: the @Stuff turns off security checks; for this page no admin is
|
|
|
|
* required and no CSRF check. If you don't know what CSRF is, read
|
|
|
|
* it up in the docs or you might create a security hole. This is
|
|
|
|
* basically the only required method to add this exemption, don't
|
|
|
|
* add it to any other method if you don't exactly know what it does
|
|
|
|
*
|
|
|
|
* @NoAdminRequired
|
|
|
|
* @NoCSRFRequired
|
|
|
|
*/
|
|
|
|
public function index() {
|
|
|
|
return new TemplateResponse('upschooling', 'index'); // templates/index.php
|
|
|
|
}
|
|
|
|
|
2021-08-21 14:00:48 +00:00
|
|
|
public function doEcho() {
|
|
|
|
return new DataResponse($_POST);
|
|
|
|
}
|
|
|
|
|
2021-08-21 10:58:00 +00:00
|
|
|
}
|