<?php

namespace Digitanie\Component\Leaflet\Site\Controller;

defined('_JEXEC') or die;

use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Factory;
use Joomla\CMS\Session\Session;

/**
 * Leaflet Component Controller
 * @since  0.0.2
 */
class LeafletController extends BaseController {

    public function initData()
    {
        if (!Session::checkToken('post')) 
        {
            echo new JsonResponse(null, JText::_('JINVALID_TOKEN'), true);
        }
        else 
        {
            parent::display();
        }
    }

}