Removed useless code

This commit is contained in:
indx0
2025-11-21 23:25:07 +03:00
parent fed3e3bbfb
commit ada915a4b6
2 changed files with 2 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import com.example.nto.entity.Place;
import com.example.nto.service.BookingService; import com.example.nto.service.BookingService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -34,6 +35,6 @@ public class BookingController {
@PostMapping("/{code}/book") @PostMapping("/{code}/book")
public ResponseEntity<Void> createBooking(@RequestBody CreateBookingDTO createBookingDTO, @PathVariable String code) { public ResponseEntity<Void> createBooking(@RequestBody CreateBookingDTO createBookingDTO, @PathVariable String code) {
bookingService.createBooking(createBookingDTO, code); bookingService.createBooking(createBookingDTO, code);
return ResponseEntity.created(null).build(); return new ResponseEntity<>(HttpStatusCode.valueOf(201));
} }
} }

View File

@@ -17,7 +17,6 @@ import java.time.LocalDate;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Entity @Entity
@ToString(exclude = {"employee", "place"})
public class Booking { public class Booking {
@Id @Id