Commit Graph

506 Commits

Author SHA1 Message Date
Oliver Eyton-Williams
f26a9b9bc0
fix(api): allow empty string for social, not undefined (#54621) 2024-05-03 09:23:47 +02:00
Oliver Eyton-Williams
9c0de67a1e
fix(api): allow server to be run from any dir (#54610) 2024-05-02 12:12:09 -07:00
Oliver Eyton-Williams
4b71954dbb
fix(api): only import types from ts-reset (#54565) 2024-04-30 09:22:16 +02:00
Oliver Eyton-Williams
84a81c842b
fix(api): remove cookie domain in development (#54518) 2024-04-26 08:32:46 -07:00
Ahmad Abdolsaheb
3f9f7e729b
feat: restrict card donation for users with little progress (#54529)
Co-authored-by: Naomi <nhcarrigan@gmail.com>
2024-04-26 16:27:50 +03:00
Oliver Eyton-Williams
0b65ec502b
fix(api): /charge-stripe-card responses (#54530)
Co-authored-by: Naomi <nhcarrigan@gmail.com>
2024-04-25 12:22:43 -07:00
Oliver Eyton-Williams
28f45b51dd
fix(api): consistent responses from certificate/showCert (#54426) 2024-04-25 14:02:59 +02:00
Oliver Eyton-Williams
d60fb06ef1
refactor(api): clean up route code (#54351) 2024-04-15 09:19:44 +02:00
Shaun Hamilton
133f07becd
chore(api): refactor schemas into individual files (#54350) 2024-04-11 14:45:56 +02:00
Muhammed Mustafa
086ff36333
feat(api): get certslug route (#50515)
Co-authored-by: Sboonny <muhammed@freecodecamp.org>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2024-04-11 12:27:46 +05:30
Shaun Hamilton
c98e1803a3
fix(api): use port 27017 (#54220) 2024-04-02 17:07:02 -07:00
Tom
be6d26c757
fix(api): add msUsername index to prisma (#54187) 2024-04-02 09:15:01 -07:00
Oliver Eyton-Williams
0f0a2682f0
fix: email authenication link messages (#54152) 2024-04-02 09:23:50 +02:00
Niraj Nandish
f6ae52f6fe
fix(api): send msUsername in get session user endpoint (#54050)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2024-03-28 18:14:31 +02:00
Shaun Hamilton
c333a74e77
fix(api): update backend project validation (#54218)
Co-authored-by: Sem Bauke <semboot699@gmail.com>
2024-03-28 10:54:29 +01:00
Oliver Eyton-Williams
8775e9d7a1
fix: double signing test (#54171) 2024-03-26 10:11:34 +01:00
Oliver Eyton-Williams
aacfb281fb
feat(api): use jwt_access_token (in development) (#53997)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2024-03-20 13:47:12 +02:00
Sem Bauke
e8e9f40cc5
feat(api): update my classroom mode (#54009) 2024-03-19 15:42:28 +02:00
Oliver Eyton-Williams
efb8cafb06
chore: copy redirect + tests to new api (#53999)
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2024-03-15 08:21:05 -05:00
Tom
2183ae4d89
feat(api): add multifile python projects to new api (#53931)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2024-03-11 15:58:09 +01:00
Niraj Nandish
0577deb64f
feat(api): submit survey endpoint (#53934)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2024-03-11 10:56:34 +01:00
Oliver Eyton-Williams
fcf6bfae6a
test: speed up api tests (#53969) 2024-03-09 10:36:19 +05:30
Oliver Eyton-Williams
9f71d1c3ac
test: stop mocking env vars in jest.utils (#53985) 2024-03-07 08:36:06 +01:00
Oliver Eyton-Williams
eb066942d8
fix(api): ms validation new api (#53983) 2024-03-06 00:05:59 -08:00
Oliver Eyton-Williams
c77a1c622f
refactor(test): improve build error message (#53946) 2024-03-01 13:09:23 +01:00
Shaun Hamilton
bbc1ffa489
feat(api): add PUT /certificate/verify (#51507)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2024-02-28 16:01:35 +00:00
renovate[bot]
73dcd322fb fix(deps): update dependency fastify to v4.26.1 2024-02-25 14:13:17 +00:00
renovate[bot]
dc84594ee5 fix(deps): update dependency @fastify/type-provider-typebox to v3.6.0 2024-02-24 14:17:39 +00:00
renovate[bot]
ded186c7b8 fix(deps): update dependency @fastify/swagger to v8.14.0 2024-02-24 14:17:18 +00:00
renovate[bot]
8209dff630 fix(deps): update dependency @fastify/session to v10.7.0 2024-02-24 10:43:14 +00:00
renovate[bot]
b253551c85 fix(deps): update dependency @fastify/cookie to v9.3.1 2024-02-24 10:40:34 +00:00
renovate[bot]
3163ceab4a fix(deps): update dependency @aws-sdk/client-ses to v3.521.0 2024-02-24 08:12:30 +00:00
renovate[bot]
accc2686e1 fix(deps): update dependency nodemailer to v6.9.10 2024-02-23 20:18:48 +00:00
renovate[bot]
a01b84bd14 chore(deps): update dependency joi to v17.12.2 2024-02-23 20:08:12 +00:00
renovate[bot]
d277d00770 chore(deps): update dependency dotenv to v16.4.5 2024-02-23 17:45:41 +00:00
Oliver Eyton-Williams
056ac85e52
chore: delete auth0 PKCE routes (#53820) 2024-02-22 22:44:13 +05:30
Oliver Eyton-Williams
6849b096b4
test: only use test dbs in testing (#53770) 2024-02-18 21:24:14 -08:00
Huyen Nguyen
dc369b0937
chore: replace deprecated jest matchers (#53759) 2024-02-16 10:17:35 +01:00
renovate[bot]
b19a10164c chore(deps): update dependency joi to v17.12.1 2024-02-14 22:26:32 +00:00
renovate[bot]
9f148c68e0 chore(deps): update dependency dotenv to v16.4.4 2024-02-14 17:45:06 +00:00
renovate[bot]
a6619b1ea6 fix(deps): update dependency mongodb to v4.17.2 2024-02-14 13:09:01 +00:00
renovate[bot]
671266d48f fix(deps): update dependency @fastify/swagger-ui to v1.10.2 2024-02-14 08:26:17 +00:00
renovate[bot]
34597bfba9 chore(deps): update dependency ts-jest to v29.1.2 2024-02-14 02:58:45 +00:00
renovate[bot]
3ebf60dd82
fix(deps): update dependency nodemailer to v6.9.9 [security] (#53503)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 12:28:18 +05:30
Tom
1efb22cd34
feat(api): add POST /exam-challenge-completed (#52395) 2023-12-27 20:40:30 +05:30
Oliver Eyton-Williams
30667f3b0d
refactor(api): DRY out route tests (#52193) 2023-11-16 09:08:32 +01:00
renovate[bot]
f83bc935e6 fix(deps): update dependency @aws-sdk/client-ses to v3.449.0 2023-11-10 22:37:14 +00:00
renovate[bot]
a9c3d4c905 fix(deps): update dependency @aws-sdk/client-ses to v3.445.0 2023-11-09 03:24:11 +00:00
renovate[bot]
27c09aaf11 chore(deps): update dependency @types/supertest to v2.0.16 2023-11-09 03:20:36 +00:00
Niraj Nandish
be00d5f3bb
feat: mobile login enpoint (#51829)
Co-authored-by: Mrugesh Mohapatra <noreply@mrugesh.dev>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-11-08 19:07:57 +00:00
Shaun Hamilton
3cc47929cf fix: remove unused ts-ignore 2023-11-08 10:11:28 +02:00
renovate[bot]
9abff22c6d fix(deps): update dependency @fastify/csrf-protection to v6.4.1 2023-11-08 10:11:28 +02:00
renovate[bot]
db3a0f06b9 chore(deps): update dependency @types/nodemailer to v6.4.14 2023-11-08 08:06:47 +00:00
renovate[bot]
87e1ae21a5
chore: update TS and Fastify (#52157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sboonny <muhammedelruby@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-11-07 17:22:59 +05:30
renovate[bot]
0325ea4373 chore(deps): update dependency @types/jsonwebtoken to v9.0.5 2023-11-07 10:34:27 +00:00
renovate[bot]
40b8cb8b48 chore(deps): update dependency @types/express-session to v1.17.10 2023-11-07 08:08:40 +00:00
renovate[bot]
5a1c22723e fix(deps): update prisma monorepo to v5.5.2 2023-11-05 12:25:40 +00:00
renovate[bot]
3cd2eac92e fix(deps): update dependency stripe to v8.222.0 2023-11-05 04:57:54 +00:00
renovate[bot]
d943c7a80f fix(deps): update dependency fast-uri to v2.3.0 2023-11-04 22:45:17 +00:00
renovate[bot]
e44aabf114 fix(deps): update dependency @fastify/csrf-protection to v6.4.0 2023-11-04 19:35:46 +00:00
renovate[bot]
bcbc99dff5 fix(deps): update dependency @aws-sdk/client-ses to v3.441.0 2023-11-04 17:48:49 +00:00
Oliver Eyton-Williams
3940eddbbb
fix(api): trim trailing space if no reporter name (#52199) 2023-11-03 16:38:19 +01:00
Oliver Eyton-Williams
135812162e
feat(api): POST /ms-trophy-challenge-completed (#51808)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2023-11-03 10:00:55 +01:00
Oliver Eyton-Williams
6163330b70
feat(api): POST /user/ms-username (#51764) 2023-11-03 09:45:21 +01:00
Oliver Eyton-Williams
59a8501f42
feat(api): DELETE /user/ms-username (#51778)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2023-11-01 09:28:04 -05:00
renovate[bot]
9b255cb859 fix(deps): update dependency @fastify/swagger-ui to v1.10.1 2023-10-28 07:41:24 +00:00
renovate[bot]
7af64e06a4 fix(deps): update dependency @aws-sdk/client-ses to v3.438.0 2023-10-28 03:22:43 +00:00
renovate[bot]
97f266ffc3 fix(deps): update dependency @fastify/swagger to v8.12.0 2023-10-28 03:15:54 +00:00
renovate[bot]
3912e15f44 chore(deps): update dependency joi to v17.11.0 2023-10-28 01:40:36 +00:00
renovate[bot]
436247916d fix(deps): update dependency pino-pretty to v10.2.3 2023-10-27 19:17:56 +00:00
renovate[bot]
3a17864f69 fix(deps): update dependency nodemailer to v6.9.7 2023-10-27 19:16:01 +00:00
renovate[bot]
bebdbdfa1c fix(deps): update dependency fastify-auth0-verify to v1.2.1 2023-10-27 17:07:49 +00:00
renovate[bot]
7d63ec5b66 chore(deps): update dependency @types/supertest to v2.0.15 2023-10-27 08:21:20 +00:00
Tom
46375c6dd6
feat(api): add exam utils and GET /exam/:id endpoint to new api (#51609) 2023-10-26 13:35:09 +05:30
renovate[bot]
619f16988a chore(deps): update dependency @types/jsonwebtoken to v9.0.4 2023-10-25 05:05:04 +00:00
renovate[bot]
27154f6b72 chore(deps): update dependency @types/express-session to v1.17.9 2023-10-25 01:40:37 +00:00
Marcel Ribeiro-Dantas
21ac8999af
docs/fix(typos): Fix minor typos in English (#51853)
Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>
2023-10-14 04:16:15 +00:00
Naomi Carrigan
09d6c1eb9e
fix(tools): update report user test (#51919) 2023-10-12 09:37:31 +05:30
Oliver Eyton-Williams
45bc74acce
fix(api): return default values for user fields (#51843) 2023-10-11 18:58:52 +03:00
Niraj Nandish
70741db619
feat(api): report user endpoint (#51170)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-10-11 20:49:05 +05:30
Krzysztof G
174865974b
fix: text typos (#51876)
Co-authored-by: Viktor Szépe <viktor@szepe.net>
2023-10-09 19:36:27 +07:00
Muhammed Mustafa
3e937e939a
fix(api): eslint error (#51860) 2023-10-07 23:05:46 +02:00
Oliver Eyton-Williams
948b7c52c2
fix(api): generate required properties for new users (#51822) 2023-10-07 10:50:30 +00:00
Oliver Eyton-Williams
2a34960415
fix(api): stop generating prisma client during tests (#51794) 2023-10-06 17:44:27 +02:00
Muhammed Mustafa
44d8add232
feat(api): add update vaildate email endpoint (#50276)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: mot01 <tmondloch01@gmail.com>
2023-10-06 15:06:42 +02:00
Ahmad Abdolsaheb
0060e78715
feat(api): add POST /donate/charge-stripe-card (#51348)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-10-06 12:56:26 +00:00
Oliver Eyton-Williams
a23a92fb8a
feat(api): allow client to signin/signout (#51679) 2023-10-04 09:34:23 -05:00
Oliver Eyton-Williams
5c8b94f236
test(api): setup mongo schema before running tests (#51686)
Co-authored-by: Muhammed Mustafa <MuhammedElruby@gmail.com>
2023-10-03 17:00:21 -05:00
Oliver Eyton-Williams
25ff25e74f
feat(api): remove csrf protection from get-session-user (#51615) 2023-10-03 16:17:00 -05:00
Oliver Eyton-Williams
58539ce080
refactor(api): DRY tests (#51776) 2023-10-03 21:44:25 +07:00
renovate[bot]
8ae3d874a4 fix(deps): update dependency @aws-sdk/client-ses to v3.421.0 2023-10-01 13:11:52 +00:00
renovate[bot]
80291fad35 fix(deps): update dependency no-profanity to v1.5.1 2023-10-01 13:11:17 +00:00
renovate[bot]
93e4b04e91
chore(deps): update dependency @total-typescript/ts-reset to v0.5.1 (#51724)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-01 16:48:50 +05:30
renovate[bot]
1c2bab4b85 fix(deps): update dependency @fastify/cookie to v9.1.0 2023-10-01 09:51:12 +00:00
renovate[bot]
878993171f fix(deps): update dependency nodemailer to v6.9.5 2023-10-01 04:58:58 +00:00
renovate[bot]
650995cf30 fix(deps): update dependency mongodb to v4.17.1 2023-10-01 04:56:46 +00:00
renovate[bot]
6969b567c5 fix(deps): update dependency @immobiliarelabs/fastify-sentry to v7.1.1 2023-10-01 03:27:53 +00:00
renovate[bot]
a087b1e27e fix(deps): update dependency @fastify/swagger to v8.10.1 2023-10-01 02:28:46 +00:00
renovate[bot]
3d3992d3dd chore(deps): update dependency @types/supertest to v2.0.13 2023-09-30 18:41:50 +00:00
Muhammed Mustafa
2d2684ac8b
feat(api): create save challenge route (#50040)
Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-09-30 23:26:57 +05:30
Muhammed Mustafa
49b728d31b
refactor: disable naming-convenction rule (#51685) 2023-09-30 20:23:39 +07:00
renovate[bot]
e41390b846 chore(deps): update dependency @types/jsonwebtoken to v9.0.3 2023-09-30 00:44:28 +00:00
Oliver Eyton-Williams
1efa4a5935
refactor(api): import ts-reset in entrypoint (#51677) 2023-09-28 09:40:51 -07:00
renovate[bot]
45fedd84e4 fix(deps): update dependency mongodb to v4.17.0 [security] 2023-09-28 16:03:53 +00:00
Muhammed Mustafa
060b0d7aab
chore(deps): update new api packages (#51549)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-09-28 19:15:15 +04:00
renovate[bot]
a383fee2a6 chore(deps): update dependency @types/express-session to v1.17.8 2023-09-23 22:11:29 +00:00
Oliver Eyton-Williams
2b5bc585a3
feat(api): sync api and api-server CORS headers (#51608) 2023-09-21 15:40:19 +02:00
Oliver Eyton-Williams
c1bc0d3f39
feat(api): handle OPTIONS requests (#51610) 2023-09-19 16:45:51 -05:00
Oliver Eyton-Williams
5cb22dca84
refactor(api): error formatting (#51595) 2023-09-19 15:55:35 -05:00
Oliver Eyton-Williams
bd460ecabf
feat(api): return flash.wrong-updating if invalid request (#51604) 2023-09-19 13:27:37 -05:00
Riya Dhawan
c12f4bfd45
feat: store sound settings in local storage (#51374)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-09-19 09:17:51 -07:00
Oliver Eyton-Williams
f67fdfd024
feat(api): update-my-portfolio (#51600) 2023-09-19 12:33:21 +03:00
Oliver Eyton-Williams
7265417970
refactor(api): better error reporting during api testing (#51594) 2023-09-18 11:13:57 -07:00
renovate[bot]
cf0e3c79ab fix(deps): update prisma monorepo to v5.3.1 2023-09-16 20:08:00 +00:00
renovate[bot]
96f2cc100e chore(deps): update jest monorepo 2023-09-16 06:41:07 +00:00
Oliver Eyton-Williams
05d19b8b42
feat: create docker images for new api (#51538) 2023-09-13 02:15:25 +05:30
Oliver Eyton-Williams
d4a68b93f7
fix(api): use reset.d.ts in development (#51533) 2023-09-12 15:30:36 +03:00
Oliver Eyton-Williams
391fc2e34d
refactor: create shared workspace (#51454) 2023-09-07 23:06:01 +05:30
Oliver Eyton-Williams
c0719934ac
chore(config): migrate constants to TS (#51485) 2023-09-06 18:27:34 +05:30
renovate[bot]
e17ebed40e fix(deps): update dependency jsonwebtoken to v9.0.2 2023-09-02 17:48:29 +00:00
Niraj Nandish
b0022fc45f
feat(api): modern challenge submission endpoint (#50998)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>
2023-08-31 14:58:58 +02:00
Oliver Eyton-Williams
567cbfc044
fix: use env.ts to get JWT_SECRET (#51424) 2023-08-30 04:20:30 +05:30
Oliver Eyton-Williams
cb9d6a6243
refactor: stop sharing api/client specific config (#51423) 2023-08-29 18:35:27 +05:30
Muhammed Mustafa
39672e14f7
refactor: use challengeTypes instead of magic numbers (#51373) 2023-08-28 09:07:49 -07:00
renovate[bot]
3d4f8e1ddc fix(deps): update prisma monorepo to v5.2.0 2023-08-27 00:39:30 +00:00
renovate[bot]
f05706fa0d chore(deps): update dependency jest to v29.6.4 2023-08-26 17:01:13 +00:00
Sem Bauke
d31e910f3a
feat: coderoad endpoint (#50636)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2023-08-24 21:23:04 +05:30
renovate[bot]
8bd01750f6 chore(deps): update dependency dotenv-cli to v7.3.0 2023-08-19 15:36:40 +00:00
renovate[bot]
b18dcecfb3 chore(deps): update dependency @fastify/type-provider-typebox to v3.5.0 2023-08-19 12:36:12 +00:00
Rene Pot
df49297de2
feat(api): improve performance with profanity filter replacement (#51112)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
2023-08-08 15:27:41 -07:00
renovate[bot]
21cfbf3a43 fix(deps): update prisma monorepo to v5.1.1 2023-08-07 14:58:58 +00:00
Oliver Eyton-Williams
8ff4e9f57a
chore: remove unused parts of prisma schema (#51177) 2023-08-07 09:37:14 -05:00
renovate[bot]
98d2032c58 chore(deps): update dependency @fastify/type-provider-typebox to v3.4.0 2023-08-05 10:06:17 +00:00
Oliver Eyton-Williams
f3da82518a
feat(api): email service (#50637)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
2023-08-04 18:57:59 -07:00
Oliver Eyton-Williams
f4a45878b7
fix(test): confirm the decoded token is correct (#51143) 2023-08-04 15:43:37 +02:00
Naomi Carrigan
0aa1ad0d09
feat: require JSDoc in new api (#50429)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-08-03 21:50:54 +05:30
Muhammed Mustafa
8b9ca4c3ab
chore(client): bump prisma to v5 (#51131) 2023-08-03 11:59:15 +02:00
Oliver Eyton-Williams
bbfb5bf08e
test(api): count userTokens before getting user (#51132) 2023-08-02 20:15:41 +03:00
Oliver Eyton-Williams
c2fff83d41
refactor(api): simplify user tests (#51111) 2023-07-31 21:08:05 +07:00
renovate[bot]
af6c4febf9 fix(deps): update dependency fastify to v4.21.0 2023-07-30 01:34:37 +00:00
renovate[bot]
6eaa03ab06 chore(deps): update dependency pino-pretty to v10.2.0 2023-07-29 22:55:02 +00:00
renovate[bot]
75ed177a7c chore(deps): update jest monorepo to v29.6.2 2023-07-29 10:20:23 +00:00
Oliver Eyton-Williams
7eba794749
feat(api): DELETE user/user-token (#50733) 2023-07-26 14:01:12 +04:00
Niraj Nandish
29556804b0
fix: update already completed challenge (#51017) 2023-07-25 12:42:37 -07:00
Oliver Eyton-Williams
9441f781fd
refactor: move challenge types to config (#51027) 2023-07-24 13:12:47 -07:00
Oliver Eyton-Williams
10eb1d9630
refactor: clean up api tests (#51035) 2023-07-23 12:33:17 +03:00
renovate[bot]
fab90da45c fix(deps): update dependency fastify to v4.20.0 2023-07-22 16:40:39 +00:00
renovate[bot]
9fd8a65767 chore(deps): update dependency pino-pretty to v10.1.0 2023-07-22 14:12:44 +00:00
Niraj Nandish
f442145731
feat(api): backend challenge submission endpoint (#50949)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-07-19 21:02:13 +02:00
Niraj Nandish
260d64a0ed
fix(api): getChallenges helper function (#51011)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-07-19 13:10:32 +02:00
Oliver Eyton-Williams
6419daa038
fix(api): specify use of Int32 for small ints (#50971)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2023-07-18 11:03:49 +02:00
Oliver Eyton-Williams
5482650dd0
feat(api): project-completed (#50701)
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
2023-07-17 12:03:17 +04:00
renovate[bot]
8dea66d7b0 chore(deps): update dependency @fastify/type-provider-typebox to v3.3.0 2023-07-15 06:24:25 +00:00
Oliver Eyton-Williams
6e787d3336
feat(api): add /user/get-session-user (#50557)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-07-11 16:28:56 +00:00
renovate[bot]
03323180fd chore(deps): update jest monorepo to v29.6.1 2023-07-09 04:51:55 +00:00
renovate[bot]
9105945b97 fix(deps): update dependency jsonwebtoken to v9.0.1 2023-07-09 00:13:51 +00:00
renovate[bot]
c5c02ce8a9 fix(deps): update dependency fastify to v4.19.2 2023-07-08 19:34:31 +00:00
renovate[bot]
8512ef948a chore(deps): update dependency pino-pretty to v10.0.1 2023-07-08 12:07:19 +00:00
Sem Bauke
e32f0c83f1
chore(api): builduser update function (#50642)
Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-07-04 22:10:22 +02:00
renovate[bot]
10204613b9 fix(deps): update dependency fastify to v4.19.1 2023-07-02 18:44:15 +00:00
renovate[bot]
c94cd4e58e fix(deps): update dependency fastify to v4.19.0 2023-07-02 07:37:56 +00:00
renovate[bot]
8763713907 fix(deps): update prisma monorepo to v4.16.2 2023-07-02 01:49:34 +00:00
renovate[bot]
986fa8c9a1 chore(deps): update dependency ts-jest to v29.1.1 2023-07-01 12:03:02 +00:00
renovate[bot]
e6b88035cf
fix(deps): update dependency jsonwebtoken to v9 [security] (#50837)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-30 17:36:48 +05:30
Oliver Eyton-Williams
16c0949a4b
feat(api): user/user-token (#50721)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-06-29 10:36:44 +00:00
Oliver Eyton-Williams
ca1b6a230a
fix(api): require CSRF token for user routes (#50684) 2023-06-28 00:04:49 +05:30
renovate[bot]
ca581d395c fix(deps): update prisma monorepo to v4.16.1 2023-06-25 07:52:07 +00:00
Muhammed Mustafa
ea45dc84b7
feat(api): add :email unsubscribe/:email to the deprecated (#50497)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-06-22 10:25:40 -05:00
Muhammed Mustafa
01ae9d3561
feat(api): add update-my-about endpoint (#50334)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Sem Bauke <semboot699@gmail.com>
2023-06-15 13:15:58 +02:00
Sem Bauke
f3385dda8e
feat: /status/ping endpoint (#50697) 2023-06-14 19:27:10 +04:00
renovate[bot]
99782e4ede fix(deps): update dependency fastify to v4.18.0 2023-06-11 03:56:47 +00:00
Oliver Eyton-Williams
65239ee68b
feat(api): allow redirection with message (#50525)
Co-authored-by: Muhammed Mustafa <MuhammedElruby@gmail.com>
2023-06-07 15:30:12 +02:00
Oliver Eyton-Williams
962f45475c
fix(api): improve schema accuracy (#50626) 2023-06-07 14:08:37 +02:00
Sem Bauke
754ae54387
feat: add /add-donation endpoint (#50441)
Co-authored-by: Muhammed Mustafa <MuhammedElruby@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-06-07 14:04:32 +02:00
Oliver Eyton-Williams
30419c2e20
refactor: register fastify-sentry directly (#50622) 2023-06-06 13:45:12 +02:00
renovate[bot]
b16f7fe042 fix(deps): update prisma monorepo to v4.15.0 2023-06-04 01:52:16 +00:00
Muhammed Mustafa
e368410c89
feat(api): deprecate get account endpoint (#50419) 2023-06-02 08:09:54 +02:00
Sem Bauke
c5deeccd3f
feat: update my username endpoint (#50271)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-06-02 07:04:50 +02:00
Niraj Nandish
8171abfa6d
feat(api): reset progress endpoint (#50432)
---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-05-26 11:26:26 +03:00
Niraj Nandish
a4ab0b4e18
chore: move update socials schema (#50506)
* chore: move update scoials schema

* fix: set maxLength value to satisfy tests
2023-05-24 11:57:19 -07:00
Oliver Eyton-Williams
2f77513a6a
fix(api): update new api schema (#50500)
* fix(api): remove unused parts of schema

isX are unused and prisma does not care what's in the db if you do not
ask for it.

* fix: add isCollegeAlgebraPyCertV8
2023-05-24 20:37:57 +03:00
Oliver Eyton-Williams
39857b5aa4
test(api): schema security (#50413)
* test: confirm all schemas pass basic validation

* refactor: use tested schemas in routes

* chore: move ajv to dev deps
2023-05-24 09:31:13 -07:00
Oliver Eyton-Williams
4cfd03224d
fix(api): cleanup test dbs after use (#50466) 2023-05-24 15:16:31 +02:00
Niraj Nandish
94534382ae
fix(api): rename account delete endpoint (#50485) 2023-05-23 21:37:29 -07:00
renovate[bot]
78f31aa966 fix(deps): update prisma monorepo to v4.14.1 2023-05-20 15:42:06 +00:00
Muhammed Mustafa
1e6b3cfa70
refactor(test): remove extra undefined mark (#50428) 2023-05-18 10:40:31 -07:00
Muhammed Mustafa
2fdaeaf550
fix(api): socials endpoint test (#50423)
fix(api): uocials endpoint textt
2023-05-18 14:08:40 +00:00
Niraj Nandish
999d8a6c03
feat(api): create account delete endpoint (#50304)
* feat(api): create account delete endpoint

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-05-18 17:01:21 +03:00
Muhammed Mustafa
885cf86cd6
feat(api): add socials links endpoint (#50332)
* feat(api): add socials links endpoint

* Sort the typo in body call

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>

* Revert "Sort the typo in body call"

This reverts commit 0588d3d70d.

---------

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
2023-05-18 17:29:43 +04:00
Muhammed Mustafa
9e905b58e1
feat(api): add json protocol to prisma client (#50418) 2023-05-18 17:16:53 +04:00
Oliver Eyton-Williams
c3c912db07
feat(api): add csrf protection (#50275)
Co-authored-by: Sboonny <muhammed@freecodecamp.org>
2023-05-18 17:06:40 +05:30
Oliver Eyton-Williams
df12c72f46
test: stop mocking FREECODECAMP_NODE_ENV (#50406)
While this lets us write slightly better tests, I don't think it's worth
the extra complexity. For example, it interferes with the creation of
test databases. We could work around this, but I'd rather keep things
simple.
2023-05-17 22:36:22 +04:00
Niraj Nandish
5bc14c21b9
feat: deprecated endpoint (#50403)
* feat: deprecated endpoints
2023-05-17 10:24:57 +03:00
renovate[bot]
0fef335292
fix(deps): update dependency @immobiliarelabs/fastify-sentry to v6 (#50388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 15:21:28 -07:00
Oliver Eyton-Williams
f6df0f3aed
docs: improve new api's mongodb setup guide (#50392)
* docs: improve new api's mongodb setup guide

* docs: give example variable

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>

* Update api/README.md

---------

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2023-05-16 20:04:41 +04:00
Naomi Carrigan
cdcea13d5f
fix(tools): api settings test (#50394) 2023-05-16 07:32:17 +03:00
Shaun Hamilton
651e1905fd
chore(api): pull prod db schema (#49735)
* chore(api): pull prod db schema

* manual user model schema

* adjust json types

* temp: fix object type

* adjust schema with Json types

* fix: oliver found my bugs 🐛

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* ttl to int, remove github from user

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: remove unused parts of the prisma schema

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-05-16 07:28:39 +03:00
Niraj Nandish
032f9d95ae
feat(api): add update privacy terms endpoint (#50300)
* feat: move update privacy terms route

* test: update privacy terms route tests

* feat: add /settings prefix to settings route

* fix: updated routes in tests

* Revert "fix: updated routes in tests"

This reverts commit 4a1305e135.

* Revert "feat: add /settings prefix to settings route"

This reverts commit 2a0d4566fe.
2023-05-15 13:21:32 -07:00
renovate[bot]
dd7e7b58f2
fix(deps): update dependency @fastify/middie to 8.3 (#50384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-15 13:43:53 +03:00
renovate[bot]
decb2e87b6
fix(deps): update dependency fastify to v4.17.0 (#50230)
* fix(deps): update dependency fastify to v4.17.0

* add missing code in error object

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sboonny <muhammed@freecodecamp.org>
2023-05-15 11:17:09 +03:00
renovate[bot]
e2716c35ea
fix(deps): update prisma monorepo to v4.14.0 (#50377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-15 11:12:59 +03:00
Muhammed Mustafa
c7f5a4cf8b
feat(api): add update IsHonest value endpoint (#50281)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-05-09 09:29:48 -07:00
Muhammed Mustafa
afd4402a49
feat(api): add subscribe to quincy email endpoint (#50305) 2023-05-09 09:10:39 +00:00
Muhammed Mustafa
d502ff973b
feat(api): add keyboard shortcut endpoint (#50286) 2023-05-09 09:55:36 +02:00
Oliver Eyton-Williams
c2cb818f87
chore(api): add test utilities (#50289) 2023-05-09 11:15:54 +05:30
Muhammed Mustafa
0d98f28b9e
feat(client): delete generic success message in the alert (#49780)
* change the flash message in profileui endpoint

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-05-08 16:58:06 +02:00
renovate[bot]
427414a24b chore(deps): update dependency @fastify/type-provider-typebox to v3.2.0 2023-05-07 08:05:16 +00:00
renovate[bot]
dd931ab4a1 fix(deps): update dependency @fastify/middie to 8.2 2023-05-07 05:43:12 +00:00
Oliver Eyton-Williams
5e17868c74
fix(api): allow fastify to set content-type dynamically (#50248)
fix: allow fastify to set content-type dynamically

We can set content-type: application/json for specific routes, but
doing so ends up with confusing, over-engineered code.

Instead we should take care when auditing the endpoints.
2023-05-02 10:15:31 -07:00
Oliver Eyton-Williams
7572f99f74
refactor(api): remove unused endpoints (#50252)
Also adds "dev" as an alias because I keep trying to use it.
2023-05-02 19:54:05 +03:00
Oliver Eyton-Williams
1567894c36
fix(api): use connection string from .env (#50201) 2023-04-27 23:06:43 +01:00
renovate[bot]
cf8dc73fae fix(deps): update prisma monorepo to v4.13.0 2023-04-27 05:32:16 +00:00
Oliver Eyton-Williams
46cdfd7802
feat(api): add CORS headers (#50120)
* test: allow mocking of env vars

Since utils/env is a module, we can mock it to control env vars in
tests. However, it's not compatible with building the server in
setupFilesAfterEnv, so, instead, we can use a utility function to keep
things DRY.

* fix: update type of fastifyTestInstance

* chore: add comment about sts preload

* chore: rename header plugin

* test: add get util + provide origin on request

* feat: add cors headers

* chore: add TODO
2023-04-26 09:02:12 +02:00
Sem Bauke
a1504eed2a
feat: update my theme endpoint (#50183)
Co-authored-by: Shaun Hamilton <ShaunSHamilton@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>
Co-authored-by: Tom <moT01@users.noreply.github.com>
2023-04-25 18:01:32 +02:00
Oliver Eyton-Williams
5f12720ad2
fix: use onRequest to add headers (#50125)
* fix: use onrequest to add headers

We want to add them no-matter what, so we should use the earliest hook
available.
2023-04-24 11:08:19 +02:00
renovate[bot]
998069441e chore(deps): update dependency @fastify/type-provider-typebox to v3.1.0 2023-04-23 22:27:54 +00:00
Sem Bauke
a980ac03e5
feat: introduce /update-my-profileui route in new API (#49827)
* feat: add response codes

* fix: update TypeBox imports

* refactor: convert inject based tests to supertest

* feat: require authentication to use route

* test: confirm db is updated as expected

* fix: respond appropriately on error

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2023-04-18 15:01:26 +00:00
Muhammed Mustafa
daa23a3d83
feat(api): swap to immobiliarelabs sentry plugin (#50041) 2023-04-17 13:10:23 -07:00
Muhammed Mustafa
01b9bd9245
fix(api): fix eslint error (#50080) 2023-04-17 20:21:36 +05:30
Oliver Eyton-Williams
6289efbbad
test(api): always start server before testing (#49994) 2023-04-17 17:54:50 +07:00
renovate[bot]
59743ad3fb fix(deps): update dependency @sentry/node to v7.48.0 2023-04-15 22:45:37 +00:00
Oliver Eyton-Williams
71d5a67745
feat(api): add security headers (#49995)
* feat(api): add security headers

Includes the OWASP recommended headers for REST APIs. Taken from
https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html#security-headers

* test: check OWASP headers appear on GET / request

* fix: only enable Strict-Transport-Security in prod
2023-04-13 10:16:58 +02:00
renovate[bot]
9d3bf49ed8
fix(deps): update prisma monorepo to v4.12.0 (#50018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-10 19:26:23 +05:30
renovate[bot]
ad1ba2e982 fix(deps): update dependency @sentry/node to v7.47.0 2023-04-09 13:58:10 +00:00
renovate[bot]
5b2c82d29f chore(deps): update dependency ts-jest to v29.1.0 2023-04-09 03:31:24 +00:00
Muhammed Mustafa
1d8e9fb0b7
feat(api): create sentry plugin (#49731)
* feat(api): add sentry plugin

Apply suggestions from code review

Revert "feat(api): add sentry plugin"

This reverts commit fcde4ee03e9b83e335a6a2bccd490490e9993597.

install sentryNode

WIP: create sentry debug

WIP: find out why use errorhandler isn't typed correct

install sentry

add the deleted sentry code

create sentry plugin

* fix error found through sentry

* Polish sentry plugin

Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>

* duplicate the changes made in the other plugin

* add done to seterrorHandler

* Fix a typo in sentry option

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>

* Stop the dns from running if a DSN wasn't provided

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>

* Polish the function and check the variable value

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* check the dsn dashboard in the env

* export dsn value if it isn't sentrydashboard

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>

* when the value is undefined init errors

* revert the if statement

* throw an error whenever an environment variable is not right

---------

Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-04-05 08:35:23 -07:00
renovate[bot]
b48d12714a
fix(deps): update dependency @sinclair/typebox to v0.26.6 (#49855)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-04-03 09:13:36 +00:00
Oliver Eyton-Williams
06d4076a45
feat(api): dev login (#49880)
Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev>
2023-03-29 18:08:38 +05:30
Oliver Eyton-Williams
a128dd8fcd
chore(api): compile TS into /dist (#49812
* chore: compile TS into /dist

Having the output co-located with the source meant that the js would be
imported by default. Given that we don't recompile on source changes,
this means the server got 'stuck' at the point of compilation and would
only register changes on build.

Also, compiling to a dist directory should make it easier to build when
we want to deploy. That said, the motivation is mostly DX.

* fix: put schema.prisma in the default location
2023-03-28 19:42:20 +05:30
renovate[bot]
afa246942e fix(deps): update dependency fastify to v4.15.0 2023-03-26 15:59:50 +00:00
renovate[bot]
7f21c5b4ae fix(deps): update dependency nodemon to v2.0.22 2023-03-26 03:01:14 +00:00
Niraj Nandish
1dcba784fd
feat(api): API documentation with Swagger UI (#49791) 2023-03-24 10:00:51 +01:00
Oliver Eyton-Williams
a0f958189e
chore: update api test suite and include it in run test (#49794) 2023-03-23 16:57:11 +00:00
Oliver Eyton-Williams
36b06be8ce
chore: extend lint:ts to cover api (#49793)
* fix: include express-session types + suppress err

* chore: add api to lint:ts

* fix: remove unnecessary typeRoots config
2023-03-22 17:59:46 +05:30
renovate[bot]
607111978a
fix(deps): update prisma monorepo to v4.11.0 (#49758)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-19 12:25:26 +05:30
Oliver Eyton-Williams
17d7fc0af5
feat(api): use pino-pretty for dev logging (#49713)
feat: use pino-pretty for dev logging
2023-03-16 15:42:01 +00:00
Tom
7aeb4ab76b
feat(api): setup jest in new api (#49709)
* feat(api): setup jest in new api

* feat: sample tests
2023-03-16 20:33:40 +05:30
Oliver Eyton-Williams
c2d149ba85
feat(api): create a demo type provider for typebox (#49536)
* feat: create a demo type provider for typebox

* feat: validate reply + share type

* fix: prettify
2023-03-15 14:21:25 +00:00
Oliver Eyton-Williams
fa7955dc75
feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
renovate[bot]
748dea033c fix(deps): update dependency fastify to v4.14.1 2023-03-11 19:45:28 +00:00
Niraj Nandish
4769a448e1
feat(api): sessions management (#49499)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-03-09 20:36:33 +05:30
Oliver Eyton-Williams
5f59b2b8c7
feat(api): validate environment variables before use (#49613)
* feat(api): validate environment variables before use

This is similar in concept to ensure-env, but a little simpler since
there is no need to put the data in a file before the api can consume
it.

* refactor: combine the two env files
2023-03-07 10:03:46 -08:00
Oliver Eyton-Williams
113036dad6
feat: depromisify fastify-jwt-authz (#49550) 2023-03-06 16:25:40 +05:30
renovate[bot]
933b909111 fix(deps): update dependency fastify to v4.14.0 2023-03-05 10:44:01 +00:00
renovate[bot]
72321ad76b fix(deps): update dependency nodemon to v2.0.21 2023-03-04 17:30:13 +00:00
Oliver Eyton-Williams
d7848ae01a
feat: migrate to pnpm for better workspace DX (#49293)
* feat: npm -> pnpm 

This resolves the issues with the gatsby client (gatsby-plugin-pnpm
deals with the fact that gatsby is relying on its own dependencies
being de-duped)
and challenge-editor (which doesn't seem to want to automatically install
codemirror and needed its own eslint config)

* fix: correct mocha path for curriculum tests

* fix: use select workspace with -F not -w

* fix: reorganise packages and restrict hoisting

pnpm works best if the workspaces keep their own dependencies, since
dependencies are not flattened and then what node resolves from a
require is predictable.

@types seem to be a special case and more care is required to prevent
them getting smushed together in the root (hence the .npmrc)

* fix: add types for tools + root

* fix: decouple challenge-auditor from client

* fix: add ui-components types

* fix(client): use the latest types for react 16

* fix: prettify

* fix: prettierignore pnpm-lock

* fix: relax hoisting

Turns out pnpm works just fine with types. I don't know what was going
wrong before, but there are no-longer any type conflicts.

* fix: add @redux-saga/core to fix eslint issue

It seems to only be redux-saga that import/named can't cope with, so it
is probably okay to work around this one.

* chore: add chai to tools/scripts/build

* fix: add store to root for cypress

* fix: allow cypress to download binaries

If we want to keep preventing cypress from downloading binaries, we can
figure out a workaround, but I'm allowing it to ease the transition to
pnpm.

My guess about why this is happening is that npm triggers Cypress's
postinstall script, but pnpm does not (because pnpm install only
installs if necessary, perferring to link)

* chore: re-enable pre/post scripts

* fix: update build scripts for client

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* chore: update engines to use pnpm


* fix: enable choice of (super)block for tests

Only 'nix machines for now.

* chore: pin pnpm to version 7

* chore: remove last npms

Except web + curriculum-server. I'll update them when I start work on
them again.

* fix: lockfile check to catch any package-locks

* fix(action): install pnpm for upcoming tests

* chore: add nodemon to new api

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-02 18:17:44 +00:00
Oliver Eyton-Williams
66438c271f
fix: add more explicit return types (#49567) 2023-03-02 17:26:40 +00:00
renovate[bot]
e0975e21e5 fix(deps): update dependency fastify to v4.13.0 2023-02-26 07:19:37 +00:00
renovate[bot]
b36bf511d5
fix(deps): update dependency @fastify/mongodb to v6.2.0 (#49512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-25 17:49:32 +02:00
renovate[bot]
ab2b6907d2 fix(deps): update dependency fastify to v4.10.2 [security] 2023-02-24 22:43:58 +00:00
Mrugesh Mohapatra
7199f033fb
feat(next-api): basic authentication setup (#49378)
* feat(next-api): add fastify-auth0-verify plugin

* feat(next-api): add fastify-jwt-authz plugin

* feat(next-api): accept privacy endpoint with scopes support

* fix(next-api): ignore eslint and ts errors

They will be fixed in a future PR when the package with errors has been updated

Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-02-24 17:26:40 +05:30
Oliver Eyton-Williams
1c9004046b
refactor: clean up errors + unused code (#49473)
* refactor: use await/done to mollify eslint

* refactor: clean up unused code

It's also more of an express pattern. Fastify routes should be
registered as plugins.
2023-02-24 17:25:56 +05:30
Oliver Eyton-Williams
f35ab4d0ba
refactor: clean up types and tsconfig (#49360) 2023-02-24 17:25:53 +05:30
Shaun Hamilton
37ed23ef38
feat(api): add node:test (#48437) 2023-02-24 17:25:22 +05:30
Shaun Hamilton
f7644bec68
feat(api): example middleware (#48434)
* feat(api): add middleware example

* feat(api): add `@fastify/middie`, reorder for alphabetness

* [skip-ci] [skip ci]
2023-02-24 17:25:21 +05:30
Shaun Hamilton
6d46f61fe9
refactor(api): shiny new api (#48432) 2023-02-24 17:23:15 +05:30