Skip to content

Commit

Permalink
3534: Removed outdated tickets API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Jan 9, 2025
1 parent faf0c8d commit 7ee6a64
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ hoeringsportal_data.api_controller_geojson_hearings:
requirements:
_permission: 'access content'

hoeringsportal_data.api_controller_geojson_tickets:
path: '/api/geojson/tickets'
defaults:
_controller: '\Drupal\hoeringsportal_data\Controller\Api\GeoJSON\TicketController::index'
_title: 'Tickets'
requirements:
_permission: 'access content'

hoeringsportal_data.api_controller_geojson_public_meeting_dates:
path: '/api/geojson/public_meetings/dates'
defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public function index() {
'geojson' => [
'hearings' => $this->generateUrl('hoeringsportal_data.api_controller_geojson_hearings'),
'public_meeting_dates' => $this->generateUrl('hoeringsportal_data.api_controller_geojson_public_meeting_dates'),
'tickets' => $this->generateUrl('hoeringsportal_data.api_controller_geojson_tickets'),
'v2' => [
'hearings' => $this->generateUrl('hoeringsportal_data.api_geojson_v2_hearings'),
],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -255,32 +255,6 @@ public function serializeGeoJsonPublicMeetingDate(object $date) {
return $serialized;
}

/**
* Serialize Ticket as GeoJSON.
*/
public function serializeGeoJsonTicket(object $ticket) {
$serialized = $this->serializeGeoJsonHearing($ticket->hearing);

$properties = &$serialized['properties'];

$data = $ticket->data;
$fields = $data->fields;
$properties = [
'ticket_id' => $data->id,
'ticket_hearing_id' => (int) $ticket->hearing->id(),
'ticket_message' => $fields->message ?? NULL,
'ticket_person_name' => $data->person->name ?? NULL,
'ticket_organization' => $fields->organization ?? NULL,
'ticket_pdf_download_url' => $fields->pdf_download_url ?? NULL,
'ticket_url' => $this->generateUrl('hoeringsportal_deskpro.hearing.ticket_view', [
'node' => $ticket->hearing->id(),
'ticket' => $data->id,
]),
];

return $serialized;
}

/**
* Get hearing tickets count.
*
Expand Down

0 comments on commit 7ee6a64

Please sign in to comment.