Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit 0c27922

Browse files
authored
Adds appropriate types to courses.service.ts
The course is missing the correct types for the `saveCourse` method so that tests were unable to run properly. Looks like this is fixed on the master branch but is not implemented in the 1-start branch. Changes: - Adds correct type information to saveCourse method in `course.service.ts`
1 parent 9a2c947 commit 0c27922

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/courses/services/courses.service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export class CoursesService {
2727
}
2828

2929

30-
saveCourse(courseId:number, changes: Partial<Course>) {
31-
return this.http.put(`/api/courses/${courseId}`, changes);
30+
saveCourse(courseId:number, changes: Partial<Course>): Observable<Course> {
31+
return this.http.put<Course>(`/api/courses/${courseId}`, changes);
3232
}
3333

3434
findLessons(

0 commit comments

Comments
 (0)