Changeset 43c9090 for src/main/java/finki/it/terapijamkbackend/spring/controllers/EventController.java
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/finki/it/terapijamkbackend/spring/controllers/EventController.java
r743de55 r43c9090 1 1 package finki.it.terapijamkbackend.spring.controllers; 2 2 3 import finki.it.terapijamkbackend.spring.entities.Coupon;4 3 import finki.it.terapijamkbackend.spring.entities.Event; 5 import finki.it.terapijamkbackend.spring.services.AppointmentService;6 4 import finki.it.terapijamkbackend.spring.services.EventService; 7 5 import jakarta.persistence.EntityNotFoundException; … … 23 21 @PutMapping("/createEvent") 24 22 public ResponseEntity<Event> updateEvent(@RequestBody Event eventItem) { 25 System.out.println(eventItem);26 23 if (eventItem.getTitle() == null || eventItem.getText() == null) { 27 24 return ResponseEntity.badRequest().build(); … … 57 54 event.setText(newEventData.getText()); 58 55 event.setImgSrc(newEventData.getImgSrc()); 59 eventService.saveEvent(event); // Save the updated coupon56 eventService.saveEvent(event); 60 57 61 58 return ResponseEntity.ok().build();
Note:
See TracChangeset
for help on using the changeset viewer.