b2e950e798
feat(components): make story creation/editing components
2023-10-04 19:38:50 -04:00
52f5b4a811
chore(workspace): add vscode snippets and launch configs
2023-10-04 19:37:38 -04:00
b000c6734a
refactor(api): rename imports and refactor error messages
2023-10-03 01:24:06 -04:00
08c49e4bdd
style(db/models): format
2023-10-03 01:22:43 -04:00
218bd5f565
chore(workspace): allow implicit this
in tsconfig
2023-10-03 01:20:29 -04:00
6167a9ea70
style: run prettier
2023-10-03 01:19:36 -04:00
f0346ebdbd
feat(api): add an endpoint to retrieve the users who have favourited a specific story
2023-10-03 01:18:12 -04:00
6b5b01fdd6
refactor(api): change error messages to imported constant values
2023-10-03 01:17:21 -04:00
f48ac551f4
style(db/models): run prettier on models/challenges
directory
2023-10-03 01:15:29 -04:00
e23faf84d4
refactor(db/models): remove reviews
field from chapter type
...
kinda redundant since there's also `IStory.reviews` :/
2023-10-03 01:14:20 -04:00
ad8be9d7fa
refactor(db/models): change draft type to story type with omitted fields
2023-10-03 01:13:16 -04:00
9fe4d0c979
feat(db/models): add co-author field to stories
2023-10-03 01:11:32 -04:00
490fa1469e
refactor(server/utils): create utility to return forum database's uid using the actual site's user id
2023-10-03 01:10:00 -04:00
97d3f86c5a
chore(workspace): update gitignore
2023-10-03 01:08:37 -04:00
6ae407c600
refactor(server/utils): add reusable ficmas utility functions
2023-10-03 01:07:29 -04:00
5dac1d6492
fix(composables): create default/empty values for nested options fields as fallbacks
2023-10-03 01:06:40 -04:00
80438ecacd
refactor(server/utils): create custom winston logger
2023-10-03 01:03:31 -04:00
6598dfd3d6
refactor(db/models): add notifyOnReviewReply
flag to user schema
2023-10-03 01:02:05 -04:00
2c282b6bcd
chore(deps): add sharp, nuxt-security and winston dependencies
2023-10-03 01:00:29 -04:00
c9723e644f
feat(api): add avatar upload route
2023-10-03 00:58:52 -04:00
da700b90d5
feat(server/middleware): create request logging middleware
2023-10-03 00:58:05 -04:00
84502b68b8
fix(server/middleware): add guard against setting event.context.currentUser
to null
2023-10-03 00:57:21 -04:00
643c8b3c77
refactor(server/middleware): create middleware to add the current story's chapter index to the context as an int (if it exists)
...
because convenience
2023-10-03 00:56:16 -04:00
d270f2a045
feat(api): add a "get all bands" endpoint
2023-10-03 00:54:55 -04:00
741d217a53
chore: create avatar image directory
2023-10-03 00:53:53 -04:00
21360669d8
refactor(server/utils): add constants file
2023-10-03 00:53:10 -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
bef6e79317
refactor(server/utils): export all story helpers from a single index.ts
file
...
this is to remove the need for importing from several different files
2023-10-03 00:51:12 -04:00
1059b560e6
refactor(api/utils): replace repetitive "forbidden" and "unauthorized" literals with constant references
2023-10-03 00:50:00 -04:00
8070e8c555
feat(api): add endpoints for retrieving a band's info and its associated stories
2023-10-03 00:48:41 -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
c8bdcc0ec3
refactor(server/utils): create reusable utilities for various story-related functions
...
`bodyHandler` takes a request body and returns the chapter content as a string
`formChapterTransform` serializes a chapter-like object supplied in a request body to an actual
proper chapter object
`getBucket` retrieves the story content gridfs bucket
`replaceGridFS` either creates or updates (deletes + reuploads) a gridfs file
2023-10-03 00:42:24 -04:00
1338e87238
feat(api/utils): add isadmin check
2023-10-03 00:33:54 -04:00
a2300d959c
refactor(client-side): combine yup schema for story chapters with story schema file
2023-10-03 00:32:53 -04:00
f3a3240134
feat(client-side): create yup schema for story form and chapter sub-forms
2023-10-03 00:31:27 -04:00
c9574dfc29
refactor(server/utils): move listQuerier
to separate database helper folder
2023-10-03 00:30:22 -04:00
09187fa5ac
feat(api): add captcha verify utility
2023-10-03 00:26:51 -04:00
972e8fa646
refactor(typing): create interfaces to ensure strongly typed form data
2023-10-03 00:23:52 -04:00
9bf5e9dc38
feat(api): create review endpoints for creating, editing, deletion and replying
2023-10-03 00:21:14 -04:00
356cb5ea6b
feat(api): create review endpoints
...
create endpoints for adding+getting a single chapter's reviews
2023-10-02 21:43:24 -04:00
2b0d478ca7
feat(api): add isLoggedIn
utility function
...
for api routes which require authentication
2023-10-02 16:20:13 -04:00
1dcb1ae3f9
feat(components): add footer component
2023-10-02 16:14:59 -04:00
cfb1f69ffb
refactor(server/middleware): move common logic for maintaining a database connection to another file
2023-10-02 16:08:12 -04:00
a16e58b2b4
refactor(db/models): change _id field in inbox schema to a reference field that points to the owning user
2023-10-02 16:06:01 -04:00
38516dc80d
feat(db/models): create dedicated private message inbox model
2023-10-02 16:02:31 -04:00
63dd3d063a
feat(api): add file upload endpoint for story content
2023-10-02 16:00:33 -04:00
d337642ed0
refactor(deps): add dependencies
...
@vueuse/core, @vueuse/nuxt, lodash-move, mammoth, marked, mongodb, mongoose-sequence [fork], sanitize-html, string-strip-html, turndown, uuid, vue-recaptcha, weird-to-normal-chars
2023-10-02 15:58:09 -04:00
983a7e3bdd
refactor: add utility functions
2023-10-02 15:55:38 -04:00
04e769ea90
refactor(client-side): modify form story+chapter types
...
chapters now have an optional id (for use when editing), and `fileName` has been simplified to `file`
2023-10-02 15:52:23 -04:00
d056dac72b
refactor(api): update function calls
2023-10-02 15:46:56 -04:00