<?php
// src/Controller/DefaultController.php
namespace App\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use App\Utils\JWTEncoder;
use App\Utils\Constantes;
use App\Utils\Utils;
use App\Utils\ExternalWallet;
use App\Utils\ApiRequest;
use Swagger\Annotations as SWG;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
/**
* @Route("/api/helloword")
*/
class HelloWorld extends AbstractController
{
private $jwtFactory;
private $apiRequest;
private $em;
public function __construct(ApiRequest $apiRequest)
{
$this->jwtFactory = JWTEncoder::getInstance();
$this->apiRequest = $apiRequest;
}
/**
* @Route("/", name="api_hello_word_index", methods={"GET"})
* @SWG\Response(
* response=200,
* description="Success",
* )
*
* @SWG\Response(
* response=404,
* description="Resource not found"
* )
*
* @SWG\Response(
* response=400,
* description="Invalid input"
* )
*
* @SWG\Tag(name="Hello World")
*/
public function index(Request $request)
{
// $ew = ExternalWallet::getInstance();
// var_dump($ew->getCredentials());die;
return $this->json([
Constantes::STATUS => Constantes::SUCCESS_CODE,
Constantes::MESSAGE => "Success",
]);
}
}