Skip to content
Open
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
dcae2b7
package.json: add @types/express
clairep94 Oct 8, 2025
e4e759c
Merge with develop
clairep94 Oct 8, 2025
fbccc7d
server/utils/isAuthenticated: update to ts, no-verify
clairep94 Oct 8, 2025
a84bf81
server/utils/isAuthenticated: update to named export & add Express ty…
clairep94 Oct 8, 2025
7a61ed3
server/routes/user.routes: organise routes into subdomains
clairep94 Oct 8, 2025
d8435a4
isAuthenticated: add test for middleware
clairep94 Oct 8, 2025
f62e9c4
move isAuthenticated to /server/middleware folder
clairep94 Oct 8, 2025
eae9ca6
server/controllers/user.controller/apiKey.test: migrate to ts, no-verify
clairep94 Oct 8, 2025
b19d61f
server/controllers/user.controller/apiKey.test: resolve type-errors
clairep94 Oct 8, 2025
c2ea2b1
server/controllers/user/apiKey: migrate to ts, no-verify
clairep94 Oct 8, 2025
8848ed5
types/express: add AuthenticatedRequest type, no-verify
clairep94 Oct 8, 2025
548e345
correctly extend the Express User interface with custom properties
clairep94 Oct 8, 2025
6ab4b3d
server/controllers/user.controller: finish typing request and respons…
clairep94 Oct 8, 2025
3f012dd
server/controllers/user.controller: Add tests for signup routes
clairep94 Oct 8, 2025
f4997b6
user controller: migrate relevant routes to /signup
clairep94 Oct 8, 2025
5c2e5d9
create user.controller/helpers.js
clairep94 Oct 8, 2025
d293ee7
controllers/user/helper: add tests and update to ts
clairep94 Oct 8, 2025
f8a7891
migrate emailVerificationInitiate to user.controller/signup & add tests
clairep94 Oct 8, 2025
e0e2aa3
server/controllers/user.controller/signup: update to ts, no-verify
clairep94 Oct 8, 2025
fff6e51
server/controllers/user.controller/signup: add response and request t…
clairep94 Oct 8, 2025
238f545
server/controllers/user.controller/userPreferences: add test for upda…
clairep94 Oct 8, 2025
df35eb4
server/controllers/user.controller/userPreferences: move updateUserPr…
clairep94 Oct 8, 2025
c455dd6
server/controllers/user.controller/userPreferences: add test for upda…
clairep94 Oct 9, 2025
6708adb
user controller tests: correct names in top-level describe
clairep94 Oct 9, 2025
2350199
user controller: add 3rd party auth management tests
clairep94 Oct 9, 2025
1afa044
user controller/auth management: migrate unlinkGithub and unlinkGoogl…
clairep94 Oct 9, 2025
85ef277
fix usercontroller helpers test
clairep94 Oct 9, 2025
13403dd
add test for resetPasswordInitiate
clairep94 Oct 9, 2025
f475d5a
migrate resetPasswordInitiate to /authManagement and add req res types
clairep94 Oct 9, 2025
d61ef5f
user controller: validResetPasswordToken, add test
clairep94 Oct 9, 2025
93695ad
user controller: validateResetPasswordToken, migrate to /authManageme…
clairep94 Oct 9, 2025
b82f974
add test for user.controller updateSettings
clairep94 Oct 9, 2025
c7cd791
user.controller/authManagement tests: re-organise with clearer describes
clairep94 Oct 9, 2025
12a98d9
user.controller updatePassword: add tests
clairep94 Oct 9, 2025
498cfe4
user.controller updatePassword: migrate to /authManagement, add req a…
clairep94 Oct 9, 2025
e845914
updateSettings: migrate to /authManagement, add req and res types, no…
clairep94 Oct 9, 2025
544bcb9
user.controller: migrate userExists to helpers & clean up file
clairep94 Oct 9, 2025
c496b67
migrate user.controller file into index file
clairep94 Oct 9, 2025
08fccf7
migrate types for userPreferences to types folder
clairep94 Oct 9, 2025
5fadd83
migrate types for user controller/signup to types folder
clairep94 Oct 9, 2025
2c14442
migrate types for usercontroller/apikey to types folder
clairep94 Oct 9, 2025
2e1bbe4
migrate tpyes for usercontroller/authManagement to types folder
clairep94 Oct 9, 2025
ea92905
add helper type in types/express to simplify defining route params
clairep94 Oct 9, 2025
3bce71f
fix logic in updateSettings to resolve type error, nest the currentPa…
clairep94 Oct 9, 2025
ea21fc1
add test util to create mockUser for typesafety
clairep94 Oct 9, 2025
33aa06b
add jsdocs to userController.signup routes
clairep94 Oct 9, 2025
57d38f7
add jsdocs to userController.userPreferences routes
clairep94 Oct 9, 2025
6332a45
update user.password to be optional per mongoose schema
clairep94 Oct 9, 2025
e8dcb59
add jsdocs to userController.authManagement routes
clairep94 Oct 9, 2025
3d78cdc
add jsdocs to userController.apiKey routes
clairep94 Oct 9, 2025
eeaa29a
add remaining tests for helpers
clairep94 Oct 9, 2025
0138eb2
uncomment failing tests for authManagement
clairep94 Oct 9, 2025
84396ed
user.controller/userPreferences: update request body type to Partial<…
clairep94 Oct 9, 2025
eb2fc4f
fix helpers tests
clairep94 Oct 9, 2025
bf9626e
fix updatePassword test
clairep94 Oct 9, 2025
df63907
clean up userPreferences test
clairep94 Oct 10, 2025
f78a692
clean up apiKey test
clairep94 Oct 10, 2025
47015cd
clean up authManagement tests
clairep94 Oct 10, 2025
b0548ea
split up authManagement tests into sub files for easier reading
clairep94 Oct 10, 2025
fd98175
clean up tests by migrating frequent mocks to mock files
clairep94 Oct 10, 2025
e46db9b
resolve updateSetting tests with current logic
clairep94 Oct 10, 2025
1426142
cleanup jsdocs
clairep94 Oct 10, 2025
b492d3e
user.controller/authManagement: update tests for updateSettings to be…
clairep94 Oct 11, 2025
60bb02a
update tests to correct typos
clairep94 Oct 11, 2025
f8fe2de
fix typo
clairep94 Oct 12, 2025
e7730d6
stronger typing on userResponse
clairep94 Oct 12, 2025
7eeac88
extend Request type for jest-express
clairep94 Oct 12, 2025
509e00a
server/controller/user: update tests to have stronger typing for requ…
clairep94 Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 128 additions & 51 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"@redux-devtools/dock-monitor": "^3.0.1",
"@redux-devtools/log-monitor": "^4.0.2",
"@reduxjs/toolkit": "^1.9.3",
"@types/express": "^5.0.3",
"acorn": "^8.14.1",
"acorn-walk": "^8.3.4",
"async": "^3.2.3",
Expand Down
389 changes: 0 additions & 389 deletions server/controllers/user.controller.js
Copy link
Collaborator Author

@clairep94 clairep94 Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrated this to a barrel structure based on the 'subdomain' of what each route is for, please see server/routes/user

Made sure to add unit tests to each item prior to migrating & did not change any logic within functions other than asserting req.user! on authenticated routes

Screenshot 2025-10-10 at 08 58 29 Screenshot 2025-10-10 at 08 58 34

This file was deleted.

Loading
Loading