The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
This PR introduces dynamic routing. This includes,
Updating the url when a user focuses on an entry /entries/:{entryId}
Focus on an existing entry if the url contains an entryId param /entries/:{entryId}
Return a 404 error if an entry is not found under a given entryId.
Add subroutes on entries based on the entry API
The entry will be returned if the user adds to the end of url /analysis or /chat provided the entry with the entryId exists
Note for full API access, the user should be able to access an entry by chatId. Currently this GET endpoint does not exists as it doesn't seem clear how the user will attain the chat url or if it is necessary considering every chat can be access with a given entryId (it doesn't seem necessary currently).
This PR introduces dynamic routing. This includes,
/entries/:{entryId}
/entries/:{entryId}
/analysis
or/chat
provided the entry with the entryId existsNote for full API access, the user should be able to access an entry by chatId. Currently this GET endpoint does not exists as it doesn't seem clear how the user will attain the chat url or if it is necessary considering every chat can be access with a given entryId (it doesn't seem necessary currently).