Removed useless code
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user