推送模块
This commit is contained in:
32
app/admin/controller/test/PushGamePeriod.php
Normal file
32
app/admin/controller/test/PushGamePeriod.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\admin\controller\test;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use app\common\library\admin\PushChannelConfigHelper;
|
||||
use support\Response;
|
||||
use Webman\Http\Request as WebmanRequest;
|
||||
|
||||
/**
|
||||
* 推送测试:public-game-period(对局公共频道)
|
||||
*/
|
||||
class PushGamePeriod extends Backend
|
||||
{
|
||||
protected ?object $model = null;
|
||||
|
||||
public function pushConfig(WebmanRequest $request): Response
|
||||
{
|
||||
$response = $this->initializeBackend($request);
|
||||
if ($response !== null) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
return $this->success('', [
|
||||
'url' => PushChannelConfigHelper::wsBaseUrl(),
|
||||
'app_key' => PushChannelConfigHelper::appKey(),
|
||||
'channel' => 'public-game-period',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user