File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 0.0.0" ,
4
4
"scripts" : {
5
5
"ng" : " ng" ,
6
- "start" : " ng serve --host=127.0.0.1" ,
6
+ "start" : " ng serve --proxy-config ./proxy.json -- host=127.0.0.1" ,
7
7
"build" : " ng build" ,
8
8
"test" : " ng test" ,
9
9
"lint" : " ng lint" ,
Original file line number Diff line number Diff line change @@ -17,18 +17,14 @@ export class CoursesService {
17
17
loadCourses ( ) : Observable < Course [ ] > {
18
18
const params = new HttpParams ( ) . set ( "page" , "1" ) . set ( "pageSize" , "10" ) ;
19
19
20
- return this . http . get < Course [ ] > ( "http://localhost:9000/ api/courses" , {
20
+ return this . http . get < Course [ ] > ( "api/courses" , {
21
21
params,
22
22
} ) ;
23
23
}
24
24
25
25
saveCourse ( course : Course ) {
26
26
const headers = new HttpHeaders ( ) . set ( "X-Auth" , "userId" ) ;
27
27
28
- return this . http . put (
29
- `http://localhost:9000/api/courses/${ course . id } ` ,
30
- course ,
31
- { headers }
32
- ) ;
28
+ return this . http . put ( `api/courses/${ course . id } ` , course , { headers } ) ;
33
29
}
34
30
}
You can’t perform that action at this time.
0 commit comments