ngrx-course-v4 icon indicating copy to clipboard operation
ngrx-course-v4 copied to clipboard

Server return empty data

Open tommythongnguyen opened this issue 7 years ago • 2 comments

Hi All i purchased your course and follow the tutorial Finally i get the server up and run at port : 8090 hit web browser with url : http://localhost:8090/api/threads .
---> { participants: [ ], messages: [ ], threads: [ ] } what the heck?
read through your findDbThreadsPerUser.ts . --> it need to be passed with the participantId which is not in this case since we try to get all data for the app in the first time loading. so what is your main ideal behind the scene? Please advice me Tommy

tommythongnguyen avatar Aug 26 '17 19:08 tommythongnguyen

You cannot just hit browser with the url http://localhost:8090/api/threads. You need to pass userId to the backend.

Checkout this line of code: this.http.patch(`/api/threads/${threadId}`, {read: true}, commonHttpHeaders(newStoreState.userId))

yehe01 avatar Sep 20 '17 04:09 yehe01

@tommythongnguyen, did you fix this issue?

Aravindaful avatar Jul 28 '18 04:07 Aravindaful