Commit Graph

31 Commits

Author SHA1 Message Date
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
9f71d1c3ac
test: stop mocking env vars in jest.utils (#53985) 2024-03-07 08:36:06 +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
Tom
1efb22cd34
feat(api): add POST /exam-challenge-completed (#52395) 2023-12-27 20:40:30 +05:30
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
Tom
46375c6dd6
feat(api): add exam utils and GET /exam/:id endpoint to new api (#51609) 2023-10-26 13:35:09 +05:30
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
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
Oliver Eyton-Williams
948b7c52c2
fix(api): generate required properties for new users (#51822) 2023-10-07 10:50:30 +00: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
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
Oliver Eyton-Williams
5cb22dca84
refactor(api): error formatting (#51595) 2023-09-19 15:55:35 -05:00
Oliver Eyton-Williams
391fc2e34d
refactor: create shared workspace (#51454) 2023-09-07 23:06:01 +05:30
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
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
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
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
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
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
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
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
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
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
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
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
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
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