Completed
Push — master ( 1bb378...803221 )
by Florian
04:44
created

ApiController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A eventAction() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the feedback project.
5
 *
6
 * (c) Florian Moser <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Controller\Administration\Semester;
13
14
use App\Controller\Base\BaseApiController;
15
use App\Entity\Event;
16
use App\Entity\Semester;
17
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
18
use Symfony\Component\HttpFoundation\JsonResponse;
19
use Symfony\Component\Routing\Annotation\Route;
20
21
/**
22
 * @Route("/api")
23
 */
24
class ApiController extends BaseApiController
25
{
26
    /**
27
     * @Route("/{event}", name="administration_semester_api_event")
28
     * @Security("has_role('ROLE_ADMIN')")
29
     *
30
     * @param Event $event
31
     *
32
     * @return JsonResponse
33
     */
34
    public function eventAction(Event $event)
35
    {
36
        return $this->returnEventPrivate($event);
37
    }
38
}
39