Ignore:
Timestamp:
11/23/21 14:58:44 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
e29cc2e
Parents:
ceaed42
Message:

adding photos

Location:
trip-planner-front/src/app/_services
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/_services/location.service.ts

    rceaed42 r59329aa  
    2626    }
    2727
    28     getLocationsFroPlanner(plannerId : number) : Observable<Location[]>{
     28    getLocationsForPlanner(plannerId : number) : Observable<Location[]>{
    2929        let url = "http://localhost:8080/api/planner/locations";
    3030        return this.httpClient.get<Location[]>(url + '?plannerId=' + plannerId);
    3131    }
     32
     33    getAllLocations() : Observable<Location[]> {
     34        let url = "http://localhost:8080/api/locations";
     35        return this.httpClient.get<Location[]>(url);
     36    }
     37
     38    getWeekendGetaways() : Observable<Location[]>{
     39        let url = "http://localhost:8080/api/weekend";
     40        return this.httpClient.get<Location[]>(url);
     41    }
     42
     43    getVillages() : Observable<Location[]>{
     44        let url = "http://localhost:8080/api/villages";
     45        return this.httpClient.get<Location[]>(url);
     46    }
     47
     48    getLocation(id : number) :Observable<Location>{
     49        let url = "http://localhost:8080/api/location/" + id;
     50        return this.httpClient.get<Location>(url);
     51    }
     52
     53    getAllLocationsForPlanner(id: number): Observable<Location[]>{
     54        let url = "http://localhost:8080/api/planner/locations";
     55        return this.httpClient.get<Location[]>(url + "?plannerId=" + id);
     56    }
     57   
    3258}
  • trip-planner-front/src/app/_services/planner.service.ts

    rceaed42 r59329aa  
    1 import { HttpClient, HttpHeaders } from "@angular/common/http";
     1import { HttpClient } from "@angular/common/http";
    22import { Injectable } from "@angular/core";
    33import { Observable } from "rxjs";
Note: See TracChangeset for help on using the changeset viewer.