interface trigger actions
This commit is contained in:
parent
9fc3de9bd3
commit
c43f3b6651
1 changed files with 19 additions and 2 deletions
|
@ -114,10 +114,9 @@ class InterfaceControllerProvider implements ControllerProviderInterface
|
|||
return $app['serializer']->serialize($output, 'json');
|
||||
});
|
||||
|
||||
// /interface/images
|
||||
$controllers->get('/images', function (Application $app) {
|
||||
|
||||
|
||||
|
||||
$http_origin = $_SERVER['HTTP_ORIGIN'];
|
||||
if ($http_origin == "https://emotionhero.com" || $http_origin == "http://emotionhero.com")
|
||||
{
|
||||
|
@ -165,6 +164,24 @@ class InterfaceControllerProvider implements ControllerProviderInterface
|
|||
return $app['serializer']->serialize($output, 'json');
|
||||
});
|
||||
|
||||
// /interface/images
|
||||
$controllers->get('/trigger/game', function (Application $app) {
|
||||
// trigger update of client:
|
||||
try{
|
||||
Websockets::triggerUpdate('game');
|
||||
}catch(\Throwable $e) {
|
||||
// nothing
|
||||
}
|
||||
});
|
||||
// /interface/images
|
||||
$controllers->get('/trigger/images', function (Application $app) {
|
||||
// trigger update of client:
|
||||
try{
|
||||
Websockets::triggerUpdate('images');
|
||||
}catch(\Throwable $e) {
|
||||
// nothing
|
||||
}
|
||||
});
|
||||
|
||||
return $controllers;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue