Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/main/src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class LoginComponent implements OnInit {
this.loginService.logging(this.user, this.password)
.pipe(
catchError((error)=>{
return of(['Deu erro parcero é isso', 'tu não vai encontrar detalhe aqui','pode sair já...', error, 'só pq sou teu amigo vou deixar esse error ai'])
return of([error])
})
)
.subscribe((response)=>{
Expand Down
4 changes: 2 additions & 2 deletions frontend/main/src/app/quote.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { ShipQtComponent } from './ship-qt/ship-qt.component';
})
export class QuoteService {

apiURL:string = 'https://maps.googleapis.com/maps/api/distancematrix/json?destinations='
apiURL:string = 'https://maps.googleapis.com/maps/api/directions/json?origin='

constructor(private http: HttpClient) { }

quote(cepOrigem:string, cepDestino:string):any{

return this.http.get(this.apiURL+cepOrigem+'&origins='+cepDestino+'&units=imperial&key=AIzaSyCKNjLUI0d01M0SfoDjIov4vZlR3DprotM')
return this.http.get<any>(this.apiURL+cepOrigem+'&destination='+cepDestino+'&key=AIzaSyCKNjLUI0d01M0SfoDjIov4vZlR3DprotM')

}

Expand Down
4 changes: 1 addition & 3 deletions frontend/main/src/app/ship-qt/ship-qt.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ export class ShipQtComponent implements OnInit {
.pipe()
.subscribe((response:any) => {
console.log(response);
console.log(response.rows);
console.log(response.rows);
alert(`${response.rows.elements.duration.text}`)
console.log(response.routes[0].legs[0].duration.text);
})
}else{
alert('DIGITE TODOS OS DADOS!')
Expand Down