Skip to content

Commit

Permalink
Doneeeeeeeeeeeee
Browse files Browse the repository at this point in the history
  • Loading branch information
svkhare committed Sep 26, 2019
1 parent dda7d06 commit 77fa233
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion applications/tripit/src/main/webapp/WEB-INF/fFailure.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<div class=nav>
<h1 style="padding-top :10px; padding-left: 30px ; color:white; font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif">Tripit</h1>
</div>
<h1 style="padding-top :40px;margin-top:150px ;padding-left: 600px ; color:cornflowerblue ;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif">The flight is full</h1>
<img src="../assests/img/bird.png" width="300px" height="300px" style="padding-left:40%; padding-top:10%">
<h1 style="padding-top :5px;margin-top:40px ;padding-left: 600px ; color:cornflowerblue ;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif">Sorry! The flight is full</h1>
</body>
</html>
3 changes: 2 additions & 1 deletion applications/tripit/src/main/webapp/WEB-INF/hFailure.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<div class=nav>
<h1 style="padding-top :10px; padding-left: 30px ; color:white; font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif">Tripit</h1>
</div>
<h1 style="padding-top :40px;margin-top:150px ;padding-left: 600px ; color:cornflowerblue ;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif">The hotel is full</h1>
<img src="../assests/img/bird.png" width="300px" height="300px" style="padding-left:40%; padding-top:10%">
<h1 style="padding-top :5px;margin-top:40px ;padding-left: 600px ; color:cornflowerblue ;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif">Sorry! The hotel is full</h1>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public ResponseEntity<Flight> bookFlight(@RequestParam String airlinesName, @Req
Flight flight = flightRepository
.findByAirlinesNameAndFlightNumberAndSourceAndDestinationAndDepartureTimeAndArrivalTime
(airlinesName, flightNumber, source, destination, endDate, beginDate).get(0);
if(flight.getTicketsLeft()==0)
return new ResponseEntity<>(HttpStatus.FORBIDDEN);
flight.setTicketsLeft(flight.getTicketsLeft()-1);
flightRepository.save(flight);
LOGGER.info("booked");
Expand Down

0 comments on commit 77fa233

Please sign in to comment.