diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/Application.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/Application.class deleted file mode 100644 index 50fb79f..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/Application.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/BookingController.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/BookingController.class deleted file mode 100644 index db52c80..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/BookingController.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/FlightsController.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/FlightsController.class deleted file mode 100644 index 1426ad9..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/FlightsController.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/Hotelcontroller.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/Hotelcontroller.class deleted file mode 100644 index 2a3a8a9..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/Hotelcontroller.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/JwtController.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/JwtController.class deleted file mode 100644 index d6912b4..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/JwtController.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/LoginController.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/LoginController.class deleted file mode 100644 index 99e2f58..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/controllers/LoginController.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/filters/AuthFilter.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/filters/AuthFilter.class deleted file mode 100644 index 0703aad..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/filters/AuthFilter.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/BookingMapper.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/BookingMapper.class deleted file mode 100644 index abd23da..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/BookingMapper.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/FlightMapper.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/FlightMapper.class deleted file mode 100644 index f3cd3bd..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/FlightMapper.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/HotelMapper.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/HotelMapper.class deleted file mode 100644 index 48b0c6e..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/HotelMapper.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/UserMapper.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/UserMapper.class deleted file mode 100644 index 9f3bcec..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/mapper/UserMapper.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/AccountInput.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/AccountInput.class deleted file mode 100644 index 3fb6c2d..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/AccountInput.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/BookingInput.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/BookingInput.class deleted file mode 100644 index 8a5d900..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/BookingInput.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/Flight.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/Flight.class deleted file mode 100644 index 7d12912..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/Flight.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/FlightBooking.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/FlightBooking.class deleted file mode 100644 index de91b80..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/FlightBooking.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/FlightInput.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/FlightInput.class deleted file mode 100644 index 219c23c..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/FlightInput.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/Hotel.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/Hotel.class deleted file mode 100644 index 7417df9..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/Hotel.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/HotelInput.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/HotelInput.class deleted file mode 100644 index 5b65977..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/HotelInput.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/User.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/User.class deleted file mode 100644 index af9cde4..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/models/User.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/BookingService.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/BookingService.class deleted file mode 100644 index d069bfe..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/BookingService.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/FlightService.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/FlightService.class deleted file mode 100644 index f3e88b7..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/FlightService.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/HotelService.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/HotelService.class deleted file mode 100644 index 97e277d..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/HotelService.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/JwtService.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/JwtService.class deleted file mode 100644 index 0b2e5a0..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/JwtService.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/LoginService.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/LoginService.class deleted file mode 100644 index e4650ed..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/LoginService.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/MyJwtToken.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/MyJwtToken.class deleted file mode 100644 index 9c39389..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/services/MyJwtToken.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/EmailConstraintValidator.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/EmailConstraintValidator.class deleted file mode 100644 index f425cf0..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/EmailConstraintValidator.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/PasswordConstraintValidator.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/PasswordConstraintValidator.class deleted file mode 100644 index 8468261..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/PasswordConstraintValidator.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/ValidEmail.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/ValidEmail.class deleted file mode 100644 index ed9463b..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/ValidEmail.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/ValidPassword.class b/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/ValidPassword.class deleted file mode 100644 index 6cff24f..0000000 Binary files a/backend-services/CodaTrips/bin/src/main/java/com/trip/coda/validators/ValidPassword.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/ApplicationTests.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/ApplicationTests.class deleted file mode 100644 index e12ef8c..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/ApplicationTests.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/FlightsControllerTest.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/FlightsControllerTest.class deleted file mode 100644 index 5a659b6..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/FlightsControllerTest.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/HotelControllerTest.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/HotelControllerTest.class deleted file mode 100644 index 3fd80b9..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/HotelControllerTest.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/JwtControllerTest.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/JwtControllerTest.class deleted file mode 100644 index 12a4625..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/JwtControllerTest.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/LoginControllerTest.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/LoginControllerTest.class deleted file mode 100644 index 3774490..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/controllers/LoginControllerTest.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/validators/EmailConstraintValidateTest.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/validators/EmailConstraintValidateTest.class deleted file mode 100644 index d03b7f5..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/validators/EmailConstraintValidateTest.class and /dev/null differ diff --git a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/validators/PasswordConstraintValidatorTest.class b/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/validators/PasswordConstraintValidatorTest.class deleted file mode 100644 index 3cf6d2a..0000000 Binary files a/backend-services/CodaTrips/bin/src/test/java/com/trip/coda/validators/PasswordConstraintValidatorTest.class and /dev/null differ diff --git a/backend-services/CodaTrips/src/main/java/com/trip/coda/Application.java b/backend-services/CodaTrips/src/main/java/com/trip/coda/Application.java index d591a7b..6ab3c4a 100644 --- a/backend-services/CodaTrips/src/main/java/com/trip/coda/Application.java +++ b/backend-services/CodaTrips/src/main/java/com/trip/coda/Application.java @@ -30,6 +30,11 @@ public FilterRegistrationBean loggingFilter(){ authBean.setFilter(new AuthFilter()); authBean.addUrlPatterns("/JwtAuth/*"); return authBean; + + + + + } public static void main(String[] args) { SpringApplication.run(Application.class, args); diff --git a/backend-services/test5/src/main/java/com/test5/test5/controllers/hotelcontroller.java b/backend-services/test5/src/main/java/com/test5/test5/controllers/hotelcontroller.java new file mode 100644 index 0000000..d5b3013 --- /dev/null +++ b/backend-services/test5/src/main/java/com/test5/test5/controllers/hotelcontroller.java @@ -0,0 +1,130 @@ +package com.test5.test5.controllers; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.test5.test5.models.HotelInput; +import com.test5.test5.models.hotels; +import com.test5.test5.repo.hotelrespository; + +@RestController +@RequestMapping("/api") +@CrossOrigin("http://localhost:4200") + +public class hotelcontroller { + + + @Autowired + private hotelrespository repo; + + +// retrival of all hotels + @GetMapping("/gethotels") + public List getAllHotels(){ + return repo.findAll(); + } + + +//retrival of location based hotel + @PostMapping(path="/getHotel/" ,consumes = "application/json" , produces = "application/json") + public List getHotels(@RequestBody HotelInput hi) + { + // System.out.println("hii"); + List hotelList=repo.findAll(); + + Iterator hotelIter=hotelList.iterator(); + List selectedList=new ArrayList(); + while(hotelIter.hasNext()) { + hotels f1=hotelIter.next(); + if(f1.getHotel_place().equals(hi.getHotel_place())){ + selectedList.add(f1); + } + + + } + + return selectedList; + + } + +//hotel insertion in to database + @PostMapping(path="/addhotel/" ,consumes = "application/json" , produces = "application/json") + public boolean addhotel(@RequestBody HotelInput hi) + { + try { + //System.out.println("hekllcvbhccccccccccccccccccccccj"); + hotels hotel = new hotels(); + System.out.println(hi.getHotel_name()); + hotel.setHotel_name(hi.getHotel_name()); + hotel.setHotel_place(hi.getHotel_place()); + hotel.setPrice(hi.getPrice()); + hotel.setHotel_description(hi.getHotel_description()); + hotel.setHotel_image(hi.getHotel_image()); + /* + hotel.setHotel_name("ddh"); + hotel.setHotel_place("dhdh"); + hotel.setPrice(12345); + hotel.setHotel_description("dhdhh"); + hotel.setHotel_image("dddjdj"); + */ + repo.save(hotel); + + return true; + } + catch(Exception ex) + { + ex.printStackTrace(); + return false; + } + + + } + + + + @GetMapping("/getf") + public boolean getAll(){ + /* + HotelInput hi = new HotelInput(); + hi.setHotel_place("chennai"); + List hotelList=repo.findAll(); + Iterator hotelIter=hotelList.iterator(); + List selectedList=new ArrayList(); + while(hotelIter.hasNext()) { + hotels f1=hotelIter.next(); + if(f1.getHotel_place().equals(hi.getHotel_place())){ + selectedList.add(f1); + } + + } + + return selectedList; + + */ + System.out.println("hekllcvbhccccccccccccccccccccccj"); + hotels hotel = new hotels(); + hotel.setHotel_name("castle rock"); + hotel.setHotel_place("bangalore"); + hotel.setPrice(12345); + hotel.setHotel_description("nice one"); + hotel.setHotel_image("dddjdj"); + repo.save(hotel); + return true; + + } + + + + } + + + diff --git a/hooks/pre-push b/hooks/pre-push new file mode 100644 index 0000000..d6d555c --- /dev/null +++ b/hooks/pre-push @@ -0,0 +1,60 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" +BASEDIR=$(eval 'realpath ./tools/pre-commit.py') +ROOTDIR=$(eval 'realpath .') +result=$(eval 'python $BASEDIR "$ROOTDIR" ') + +if [ "$result" == "0" ]; then + exit 1 +fi + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo >&2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/proj1/src/app/components/userlogin/userlogin.component.ts b/proj1/src/app/components/userlogin/userlogin.component.ts index 85a1d2a..c1cc985 100644 --- a/proj1/src/app/components/userlogin/userlogin.component.ts +++ b/proj1/src/app/components/userlogin/userlogin.component.ts @@ -37,5 +37,3 @@ export class UserloginComponent implements OnInit { } } - - diff --git a/proj1/src/app/services/addhotel.service.ts b/proj1/src/app/services/addhotel.service.ts index 34dd269..d2cfffe 100644 --- a/proj1/src/app/services/addhotel.service.ts +++ b/proj1/src/app/services/addhotel.service.ts @@ -7,30 +7,28 @@ import { map, catchError, tap } from 'rxjs/operators'; }) export class AddhotelService { - endpoint = 'http://localhost:3000/api/v1/'; - httpOptions = { + endpoint = 'http://localhost:3000/api/v1/'; + httpOptions = { headers: new HttpHeaders({ - 'Content-Type': 'application/json' + 'Content-Type': 'application/json' }) }; result; - constructor(private http:HttpClient) { } + constructor(private http: HttpClient) { } private extractData(res: Response) { - let body = res; - return body || { }; + const body = res; + return body || {}; } getProducts(): Observable { return this.http.get('http://localhost:8080/api/gethotels').pipe( map(this.extractData)); } - public postUser(data){ - console.log(data) - this.http.post("http://localhost:8080/api/addhotel/",data).subscribe(res=>{this.result=res;console.log(this.result);}); + public postUser(data) { + this.http.post('http://localhost:8080/api/addhotel/', data).subscribe(res => { this.result = res; console.log(this.result); }); } getProduct(data): Observable { - console.log(data) - return this.http.post("http://localhost:8080/api/getHotel/",data) + return this.http.post('http://localhost:8080/api/getHotel/', data); } } diff --git a/proj1/src/app/services/book-service.service.ts b/proj1/src/app/services/book-service.service.ts index 9c03b6d..13ef8c6 100644 --- a/proj1/src/app/services/book-service.service.ts +++ b/proj1/src/app/services/book-service.service.ts @@ -6,26 +6,26 @@ import { HttpClientModule, HttpClient, HttpHeaders } from '@angular/common/http' }) export class BookServiceService { - private details:any; + private details: any; - token:any; + token: any; - constructor(private http:HttpClient) { } + constructor(private http: HttpClient) { } - setDetails(details:any){ + setDetails(details: any) { console.log(details); this.details = details; } - getDetails(){ + getDetails() { return this.details; } - bookTicket(bookDetails:any){ + bookTicket(bookDetails: any) { this.token = localStorage.getItem('token'); - const headers= new HttpHeaders({ - 'token':this.token - }) - return this.http.post("http://localhost:8080/JwtAuth/book/",bookDetails,{headers:headers,observe:'response' as 'body'}); + const headers = new HttpHeaders({ + 'token': this.token + }); + return this.http.post('http://localhost:8080/JwtAuth/book/', bookDetails, { headers: headers, observe: 'response' as 'body' }); } } diff --git a/proj1/src/app/services/flight.service.ts b/proj1/src/app/services/flight.service.ts index a2de7ff..51745d7 100644 --- a/proj1/src/app/services/flight.service.ts +++ b/proj1/src/app/services/flight.service.ts @@ -1,8 +1,8 @@ -import { Injectable } from "@angular/core"; -import { HttpClient, HttpHeaders } from "@angular/common/http"; +import { Injectable } from '@angular/core'; +import { HttpClient, HttpHeaders } from '@angular/common/http'; @Injectable({ - providedIn: "root" + providedIn: 'root' }) export class FlightService { constructor(private http: HttpClient) { } @@ -12,11 +12,11 @@ export class FlightService { getFlights(searchDetails: any) { console.log('input' + searchDetails); - return this.http.post("http://localhost:8080/api/getFlight/", searchDetails); + return this.http.post('http://localhost:8080/api/getFlight/', searchDetails); } getHotDeals() { - return this.http.get("http://localhost:8080/api/getFlights"); + return this.http.get('http://localhost:8080/api/getFlights'); } } diff --git a/proj1/src/app/services/hot-deals.service.ts b/proj1/src/app/services/hot-deals.service.ts deleted file mode 100644 index 41f71e2..0000000 --- a/proj1/src/app/services/hot-deals.service.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class HotDealsService { - - constructor() { } - - city: any[]=[{ - flightName:"Madurai", - price:"Madurai-Chennai", - image:"https://www.travelsupermarket.com/content/dam/travelsupermarket/Hub_content_images/last-minute/lastminute-flight.jpg" - }, - { - flightName:"Chennai", - price:"Chennai-Dubai", - image:"https://imgak.mmtcdn.com/pwa-hlp/assets/img/hlp/deals/ic-flight-14.jpg" - }, - { - flightName:"Delhi", - price:"Delhi-Sikkim", - image:"http://travelguysradio.com/wp-content/uploads/2016/05/maxresdefault.jpg" - } -]; - -flights:any[] = [ - { - flightName:"Mumbai", - price : "1200", - image:"https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/02/airplane-flight-sunset.jpg?itok=8iUtkHU-" - }, - { - flightName:"Chennai", - price : "1300", - image: "https://fm.cnbc.com/applications/cnbc.com/resources/img/editorial/2018/06/01/105245766-Singapore-Airlines-A350URL.1910x1000.jpg" - }, - { - flightName:"Madurai", - price : "1400", - image: "https://www.livemint.com/rf/Image-621x414/LiveMint/Period2/2018/09/04/Photos/Processed/indigo-kDEC--621x414@LiveMint.jpg" - }, - { - flightName:"kolkata", - price : "2000", - image:"https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/02/airplane-flight-sunset.jpg?itok=8iUtkHU-" - }, - { - flightName:"Sikkim", - price : "1400", - image:"https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2017/02/airplane-flight-sunset.jpg?itok=8iUtkHU-" - }, - { - flightName:"Nepal", - price : "2500", - image:"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDBw83Kx6y_uUBZ02EVP-G290plaoOTfaEj32s2c6BkaSj0ZrR1Q" - }, - { - flightName:"manipur", - price : "2300", - image:"http://www.berjaya-air.com/data/uploads/web-banner.jpg" - }, - { - flightName:"kashmir", - price : "2300", - image:"https://media.cntraveller.in/wp-content/uploads/2018/01/CE63NW-Cropped-866x487.jpg" - }, - { - flightName:"indore", - price : "2300", - image:"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDBw83Kx6y_uUBZ02EVP-G290plaoOTfaEj32s2c6BkaSj0ZrR1Q" - }, - - ]; - - getDetails(){ - return this.city; - } - getFlightDetails(){ - return this.flights; - } -} diff --git a/proj1/src/app/services/register-service.service.ts b/proj1/src/app/services/register-service.service.ts index 89e8ea4..5916282 100644 --- a/proj1/src/app/services/register-service.service.ts +++ b/proj1/src/app/services/register-service.service.ts @@ -6,13 +6,13 @@ import { HttpClient } from '@angular/common/http'; }) export class RegisterServiceService { result; - constructor(private http:HttpClient) { } - public postUser(email:String,password:String){ - var options = { - email : email, - password : password - + constructor(private http: HttpClient) { } + public postUser(email: String, password: String) { + const options = { + email: email, + password: password + }; - return this.http.post("http://localhost:8080/api/register/",options).subscribe(res=>{this.result=res;console.log(this.result);}); + return this.http.post('http://localhost:8080/api/register/', options).subscribe(res => { this.result = res; }); } } diff --git a/proj1/src/app/services/token.service.ts b/proj1/src/app/services/token.service.ts index 9bc0225..1615bb6 100644 --- a/proj1/src/app/services/token.service.ts +++ b/proj1/src/app/services/token.service.ts @@ -24,4 +24,4 @@ export class TokenInterceptor implements HttpInterceptor { return next.handle(request); } -} \ No newline at end of file +} diff --git a/sampleapp/target/classes/application.properties b/sampleapp/target/classes/application.properties index 3c3d291..25c7c3b 100644 --- a/sampleapp/target/classes/application.properties +++ b/sampleapp/target/classes/application.properties @@ -1,6 +1,6 @@ spring.datasource.url = jdbc:mysql://localhost:3306/coda?useSSL=false spring.datasource.username = root -spring.datasource.password = root1 +spring.datasource.password = root ## Hibernate Properties diff --git a/sampleapp/target/classes/com/test5/test5/controllers/hotelcontroller.class b/sampleapp/target/classes/com/test5/test5/controllers/hotelcontroller.class index 60b2a8c..dc85b4b 100644 Binary files a/sampleapp/target/classes/com/test5/test5/controllers/hotelcontroller.class and b/sampleapp/target/classes/com/test5/test5/controllers/hotelcontroller.class differ diff --git a/tools/java-linting-tools/google_checks.xml b/tools/java-linting-tools/google_checks.xml index 2ad6787..dda4d93 100644 --- a/tools/java-linting-tools/google_checks.xml +++ b/tools/java-linting-tools/google_checks.xml @@ -23,9 +23,6 @@ - - - diff --git a/tools/pre-commit.py b/tools/pre-commit.py index 4faadf6..be05e07 100644 --- a/tools/pre-commit.py +++ b/tools/pre-commit.py @@ -3,8 +3,7 @@ import subprocess import sys from glob import glob -def fun(): - sys.stderr.write("Hiiiii") +def fun(): commitids = os.popen('git log --format="%H" -n 2').read() commitids = commitids.splitlines() diff = os.popen('git diff --name-only ' + commitids[0] + ' ' + commitids[1]).read() @@ -19,16 +18,22 @@ def fun(): if len(cmd) != 0: isLintingProper = 0 sys.stderr.write(i) - sys.stderr.write(cmd) + sys.stderr.write(str(cmd)) elif os.path.splitext(base)[1] == '.java': # print(basepath+i) - cmd = os.popen('java -jar ' + basepath+'tools\\java-linting-tools\\checkstyle-8.17-all.jar -c '+basepath + 'tools\\java-linting-tools\\sun_checks.xml ' + basepath+i).read() - # print(cmd) - # sys.stderr.write(str(len(cmd))) + cmd = os.popen('java -jar ' + basepath+'tools\\java-linting-tools\\checkstyle-8.17-all.jar -c '+basepath + 'tools\\java-linting-tools\\google_checks.xml ' + basepath+i).read() + errors = cmd + cmd = cmd.splitlines() + if cmd.count('Starting audit...') != 0: + cmd.remove('Starting audit...') + if cmd.count('Audit done.') != 0: + cmd.remove('Audit done.') + if cmd.count('Files to process must be specified, found 0.') != 0: + cmd.remove('Files to process must be specified, found 0.') if len(cmd) != 0: isLintingProper = 0 sys.stderr.write(basepath+i) - sys.stderr.write(cmd) + sys.stderr.write(str(errors)) return isLintingProper