2016-07-20 06:31:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class CheckSessionController extends Controller {
|
|
|
|
const PATH = '/check-session';
|
2017-02-08 19:09:15 +01:00
|
|
|
const METHOD = 'POST';
|
2016-07-20 06:31:07 +02:00
|
|
|
|
|
|
|
public function validations() {
|
|
|
|
return [
|
|
|
|
'permission' => 'any',
|
|
|
|
'requestData' => []
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function handler() {
|
|
|
|
$session = Session::getInstance();
|
|
|
|
|
|
|
|
Response::respondSuccess([
|
|
|
|
'sessionActive' => $session->sessionExists()
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|