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 lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatusCode;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -34,6 +35,6 @@ public class BookingController {
|
||||
@PostMapping("/{code}/book")
|
||||
public ResponseEntity<Void> createBooking(@RequestBody CreateBookingDTO createBookingDTO, @PathVariable String 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
|
||||
@AllArgsConstructor
|
||||
@Entity
|
||||
@ToString(exclude = {"employee", "place"})
|
||||
public class Booking {
|
||||
|
||||
@Id
|
||||
|
||||
Reference in New Issue
Block a user