ngrx-course-v4
ngrx-course-v4 copied to clipboard
Server return empty data
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
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))
@tommythongnguyen, did you fix this issue?