David Thornley 6 jaren geleden
bovenliggende
commit
333727e676
2 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 1
    0
      zlg/src/pages/home/home.ts
  2. 3
    3
      zlg/src/providers/userProvider.ts

+ 1
- 0
zlg/src/pages/home/home.ts Bestand weergeven

@@ -5,6 +5,7 @@ import SockJS from 'sockjs-client';
5 5
 
6 6
 import { NavController } from 'ionic-angular';
7 7
 
8
+
8 9
 @Component({
9 10
   selector: 'page-home',
10 11
   templateUrl: 'home.html'

+ 3
- 3
zlg/src/providers/userProvider.ts Bestand weergeven

@@ -6,13 +6,13 @@ import {Injectable} from "@angular/core";
6 6
 export class UserService{
7 7
 
8 8
 
9
-  public API = "http://localhost:8080";
10
-  public USER_API = this.API + "/users/posts";
9
+  public API = "https://fast-headland-39537.herokuapp.com";
10
+  public USER_API = this.API + "/posts/id/";
11 11
 
12 12
   constructor(public http: HttpClient) {
13 13
   }
14 14
 
15 15
   getAllPostsByUserId(id: string):Observable<any> {
16
-    return this.http.get(this.USER_API + '/' + id);
16
+    return this.http.get(this.USER_API + id);
17 17
   }
18 18
 }