Skip to content

Commit 62ed889

Browse files
committed
Angular Forms Course
1 parent 4317798 commit 62ed889

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/services/courses.service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ export class CoursesService {
1717
return this.http.get<Course>(`/api/courses/${courseId}`);
1818
}
1919

20-
findCourseCategories(): Observable<string[]> {
21-
return this.http.get<string[]>(`/api/course-categories`);
20+
findCourseCategories() {
21+
return this.http.get(`/api/course-categories`)
22+
.pipe(
23+
map(res => res["categories"])
24+
);
2225
}
2326

2427
findAllCourses(): Observable<Course[]> {

0 commit comments

Comments
 (0)