fix(continuous-integration): correction php-cs-fixer
All checks were successful
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
All checks were successful
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
@ -9,24 +10,24 @@ use Symfony\Component\Mercure\Update;
|
||||
|
||||
class PublishController extends AbstractController
|
||||
{
|
||||
public function sample($id){
|
||||
return $this->render('Home/publishsample.html.twig',[
|
||||
'id'=>$id
|
||||
public function sample($id)
|
||||
{
|
||||
return $this->render('Home/publishsample.html.twig', [
|
||||
'id' => $id,
|
||||
]);
|
||||
}
|
||||
|
||||
public function publish($channel, $id, Request $request, HubInterface $hub): Response
|
||||
{
|
||||
$ret=$request->get("msg");
|
||||
$ret["from"]=[];
|
||||
$ret["from"]["id"]=$this->getUser()->getId();
|
||||
$ret["from"]["username"]=$this->getUser()->getUsername();
|
||||
$ret["from"]["displayname"]=$this->getUser()->getDisplayname();
|
||||
$ret["from"]["avatar"]=$this->generateUrl('app_minio_image',["file"=>"avatar/".$this->getUser()->getAvatar()]);
|
||||
|
||||
$ret = $request->get('msg');
|
||||
$ret['from'] = [];
|
||||
$ret['from']['id'] = $this->getUser()->getId();
|
||||
$ret['from']['username'] = $this->getUser()->getUsername();
|
||||
$ret['from']['displayname'] = $this->getUser()->getDisplayname();
|
||||
$ret['from']['avatar'] = $this->generateUrl('app_minio_image', ['file' => 'avatar/'.$this->getUser()->getAvatar()]);
|
||||
|
||||
$update = new Update(
|
||||
$channel."-".$id,
|
||||
$channel.'-'.$id,
|
||||
json_encode(
|
||||
['ret' => $ret])
|
||||
);
|
||||
@ -35,4 +36,4 @@ class PublishController extends AbstractController
|
||||
|
||||
return new Response('published!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user