-
Notifications
You must be signed in to change notification settings - Fork 398
Open
Description
On
return this.http.get<Course[]>("/api/courses") |
it should be
this.http.get<{payload: Course[]}>
so you need to to do additional casting with
map(res => res["payload"]), |
as TypeScript would already know the type of the payload, so you can do
map(res => res.payload)
and it would already have the correct type.
Same goes for all the other HTTP requests.
Metadata
Metadata
Assignees
Labels
No labels