hiyaryan / the-cdj

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!!
https://thecdj.app
2 stars 0 forks source link

Add default title to journal. #125

Closed hiyaryan closed 5 months ago

hiyaryan commented 5 months ago

This PR fixes a bug where the initial title of a new journal does not populate. This was likely due it not being required and the JOI validation having conflicting rules. JOI validation removes allow and empty rules for empty strings and instead depends on the default value to populate the title if it does happen to be empty. Note that this fallback very likely won't happen now that the default value has been explicitly set.