Commit Graph

267 Commits

Author SHA1 Message Date
50e860df5d
refactor(api): use null propagation for fields in subscription payload 2023-12-11 21:34:20 -05:00
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
0ebc25a1c8
refactor(server/utils): allow an IDraft to be passed to permission checker 2023-12-11 21:20:06 -05:00
fd4de6489f
refactor(server/utils): move html normalizer into its own importable function 2023-12-11 21:13:22 -05:00
be0107b415
chore(nuxt): ignore typescript nitpick 2023-12-09 17:49:09 -05:00
f57fd2df84
chore(api/utils): remove unused import 2023-12-09 17:48:07 -05:00
cd6872b06e
chore(workspace): disable verbatimModuleSyntax in tsconfig 2023-12-09 17:45:23 -05:00
e8bb6d7ab1
chore(workspace): add recommended extensions for vscode 2023-12-09 17:44:16 -05:00
f4d4ed3099
fix(api): throw error if story for the review to be replied to doesn't exist 2023-12-09 17:42:31 -05:00
7f1f8a72f5
refactor(api): get new reply id from save() call 2023-12-09 17:39:28 -05:00
489b2e0558
chore(workspace): create webstorm run configurations 2023-12-09 17:32:26 -05:00
6689536762
refactor(pages): migrate page titles to usehead 2023-12-09 17:32:26 -05:00
70cc843f15
refactor(typing): rename file with nuxt-auth definition override 2023-12-09 17:32:25 -05:00
7e300734d8
refactor(api/utils): switch to if...else if for each check 2023-12-09 17:32:24 -05:00
b979b52978
fix(plugins): remove ssr style
it breaks shit. not cool.
2023-12-09 17:32:24 -05:00
bd098c987b
fix(server/plugins): use additional hooks to determine page readiness 2023-12-09 17:32:23 -05:00
989fefd6e7
fix(pages & middleware): throw error if non-author/collaborator tries to edit a story 2023-12-09 17:32:23 -05:00
a5346e8622
fix(client-side): add error check to story redirect middleware 2023-12-09 17:31:39 -05:00
da3beefa6f
chore(typing): get rid of dangling .d.ts 2023-12-09 17:10:03 -05:00
4826bb7436
feat(pages): add fallback redirect to /story/[id] route
this will redirect to the first chapter, per default behaviour
2023-12-09 17:08:02 -05:00
410cb580d8
refactor(components): add autoEdit call to story form component
... if `canDraft` == false
2023-12-09 17:04:57 -05:00
6dfabd87d0
feat(nuxt): add formal error page 2023-12-09 17:03:36 -05:00
c9be671507
refactor(pages): move stuff to default layout
this allows layout to be shared between non-error and error pages without repeating code
2023-12-09 17:02:56 -05:00
e8aea81b0b
fix(server/utils): add null check to storyQuerier 2023-12-09 17:01:13 -05:00
46c9a07b7d
refactor(api/utils): add isLoggedIn guard to story checks 2023-12-09 17:00:22 -05:00
3bc828ad5e
fix(api): allow admins to access a hidden story's full contents 2023-12-09 16:58:35 -05:00
37e9bcc17c
fix(api): fix error not throwing on an illegal access of a full hidden story 2023-12-09 16:56:57 -05:00
ee7ea24e4e
refactor(*): rename route
change "bands" to "band"

BREAKING CHANGE: breaks anything that tries to access `/api/bands/*`
2023-12-06 22:22:48 -05:00
b0a69d5d56
fix(components): change error prop from undefined to empty string 2023-12-06 22:20:09 -05:00
fe7c452231
feat(client-side): create story middleware
redirect users to the login page if a story is restricted and they're not logged in
2023-12-06 22:19:05 -05:00
17e9d0cbf8
chore(deps): add/update dependencies
add typescript, update nuxt
2023-12-06 22:17:29 -05:00
b3594c3cdb
refactor(server/utils): add chapter index parameter to storyCheck function 2023-12-06 22:16:35 -05:00
22816477eb
refactor(server/utils): add chapter index parameter to storyCheck function 2023-12-06 22:11:41 -05:00
653d5c5f32
perf(nuxt): re-enable caching 2023-12-06 21:58:35 -05:00
25a68b1f3e
refactor(pages): rename session data variable in setup script
i want to make sure only super duper important variables are named "data".
2023-12-06 21:57:33 -05:00
96a0d36bef
fix(api): update user stories endpoint
it now takes into account the new return type for `listQuerier`
2023-12-06 21:52:04 -05:00
43f16b026d
refactor(components): add lock icon
adds a lock icon beside restricted stories in listings if not logged in
2023-12-06 21:50:41 -05:00
fa27a16e65
fix(api): update review editing endpoint
when checking for whether the requester is the author, treat the author field as an object rather than a number (id)
2023-12-06 21:48:29 -05:00
c9f5d5466d
fix(api): populate user's favourite stories' bands 2023-12-06 21:46:33 -05:00
b2ca5a13a1
feat(pages): create chapter index page
just a page that lists each chapter and its summary
2023-12-06 21:44:59 -05:00
c9229b6c59
refactor(nuxt): create and use title template 2023-12-06 21:43:25 -05:00
c4fc0806ed
feat(pages): add main story page
(finally)
2023-12-06 21:42:04 -05:00
b21aab4940
refactor(db/models): remove existence guard/check from models 2023-12-06 21:39:59 -05:00
b5454e9363
feat(api): add endpoint to fetch latest stories 2023-12-06 21:38:30 -05:00
c27c81f39c
refactor(api/utils): update isAdmin check
make it also check that the user is logged in; eliminates need to type `isLoggedIn()` on the previous line
2023-12-06 21:37:54 -05:00
e37a54e775
refactor(api): strengthen typing
add dedicated fetchResult type (ex., for `listQuerier` return)
2023-12-06 21:36:46 -05:00
48db8b0575
refactor(pages): update home page
remove placeholder crap
2023-12-06 21:34:33 -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
faaf385bde
refactor(server/utils): strengthen typing
mongoose middleware helper functions are now properly typed
2023-12-06 21:30:22 -05:00
9dbf0548d7
refactor(db/models): remove existence guard/check from models 2023-12-06 21:28:51 -05:00