Ignore:
Timestamp:
10/12/24 21:32:15 (5 weeks ago)
Author:
macagaso <gasoskamarija@…>
Branches:
master
Parents:
743de55
Message:

Updated version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/finki/it/terapijamkbackend/spring/controllers/EventController.java

    r743de55 r43c9090  
    11package finki.it.terapijamkbackend.spring.controllers;
    22
    3 import finki.it.terapijamkbackend.spring.entities.Coupon;
    43import finki.it.terapijamkbackend.spring.entities.Event;
    5 import finki.it.terapijamkbackend.spring.services.AppointmentService;
    64import finki.it.terapijamkbackend.spring.services.EventService;
    75import jakarta.persistence.EntityNotFoundException;
     
    2321    @PutMapping("/createEvent")
    2422    public ResponseEntity<Event> updateEvent(@RequestBody Event eventItem) {
    25         System.out.println(eventItem);
    2623        if (eventItem.getTitle() == null || eventItem.getText() == null) {
    2724            return ResponseEntity.badRequest().build();
     
    5754        event.setText(newEventData.getText());
    5855        event.setImgSrc(newEventData.getImgSrc());
    59         eventService.saveEvent(event); // Save the updated coupon
     56        eventService.saveEvent(event);
    6057
    6158        return ResponseEntity.ok().build();
Note: See TracChangeset for help on using the changeset viewer.