Class EventController

java.lang.Object
org.localify.event.EventController

@RestController @RequestMapping("/v1/events") @ConditionalOnWebApplication public class EventController extends Object
Controller for handling event-related requests.
  • Constructor Details

    • EventController

      @Autowired public EventController(EventService eventService)
      Constructs a new EventController.
      Parameters:
      eventService - The event service.
  • Method Details

    • getById

      @GetMapping(value="/{eventId}", produces="application/json") @ResponseBody public EventResponseExtended getById(@AuthenticationPrincipal UserDetailsImpl user, @PathVariable UUID eventId)
      Gets an event by its ID.
      Parameters:
      user - The authenticated user.
      eventId - The ID of the event.
      Returns:
      The extended event response DTO.
    • deleteById

      @DeleteMapping("/{eventId}") @ResponseStatus(NO_CONTENT) public void deleteById(@AuthenticationPrincipal UserDetailsImpl user, @PathVariable UUID eventId)
      Deletes an event by its ID.
      Parameters:
      user - The authenticated user.
      eventId - The ID of the event to delete.
    • patchById

      @PatchMapping("/{eventId}") public EventResponse patchById(@AuthenticationPrincipal UserDetailsImpl user, @PathVariable UUID eventId, @RequestBody @Valid @Valid EventPatchRequest request)
      Patches an event by its ID.
      Parameters:
      user - The authenticated user.
      eventId - The ID of the event to patch.
      request - The patch request.
      Returns:
      The event response DTO.