I have a Firestore DB with this structure.
-user [root collection]
--userid [doc]
--work [sub collection]
--documentID [document with required data]
I want users to be able to click a link they are given such as:
mysite.com/work.html?work=documentID
This would open the page mysite.com/work.html and pull in the data from documentID to the page and display the data in the named document to the user.
Alternatively, they could enter url of;
mysite.com/users/work/documentID.
and be displayed the same information.
Users are always logged in before taking any actions. Stack is Firestore, Firebase Hosting, Node and Cloud Functions, jQuery.
I wonder if I am being very dumb, but I really can't work out how to get started to make this work - turning up a blank on all kinds of searches for how to do this, so I'd really appreciate some help!