Commit Graph

11 Commits

Author SHA1 Message Date
088232f750
refactor(api & server/utils): refactor imports of db helpers
create an index file which exports the functions we need in one accessible place
2023-12-11 21:29:46 -05:00
fd4de6489f
refactor(server/utils): move html normalizer into its own importable function 2023-12-11 21:13:22 -05:00
e8aea81b0b
fix(server/utils): add null check to storyQuerier 2023-12-09 17:01:13 -05:00
45783c60a9
refactor(api/utils): update listQuerier helper
make it return an object containing a sliced array and a total
2023-12-06 21:31:50 -05:00
d5de2499ab
refactor(server/utils): make the chapter index parameter in the chapterTransformer function mandatory 2023-12-01 17:57:17 -05:00
64f3bf23ea
refactor(server/utils): add chapter index argument to chapterTransformer 2023-10-11 16:37:18 -04:00
01d3b7f22b
feat(api): integrate co-author feature in api routes and helpers 2023-10-11 15:31:02 -04:00
c502acbba9
fix(api/utils): fix listquerier
make it so that `author` is an object we can assign to, NOT a number
2023-10-10 22:25:25 -04:00
dd9fcaf5ae
refactor(api/utils): add story query helper function
to avoid having to write the same `populate` calls over and over
2023-10-03 00:52:24 -04:00
66d6168a31
refactor(server/utils): add transformer for regular chapter objects
this transforms a story object into a slightly different object to be served by the api. notable differences are the `totalChapters` field and the removal of the `chapters` array. `chapters` is then replaced by a `currentChapter` object, representing the currently "selected" chapter, with an added `text` field
2023-10-03 00:46:57 -04:00
c9574dfc29
refactor(server/utils): move listQuerier to separate database helper folder 2023-10-03 00:30:22 -04:00