Commit Graph

40 Commits

Author SHA1 Message Date
Shaun Hamilton
22a56eddfb
refactor(api): remove exam-env feature flag (#63909) 2025-11-24 20:08:06 +05:30
Mrugesh Mohapatra
3cbe2ab8b1
fix(tools): consolidate docker compose setup (#62525)
Some checks failed
i18n - Build Validation / Validate i18n Builds (22) (push) Has been cancelled
CI - Node.js / Lint (22) (push) Has been cancelled
CI - Node.js / Build (22) (push) Has been cancelled
CI - Node.js / Test (22) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (22) (push) Has been cancelled
CD - Docker - DOCR Cleanup Container Images / Delete Old Images (learn-api, dev) (push) Has been cancelled
CD - Docker - DOCR Cleanup Container Images / Delete Old Images (learn-api, org) (push) Has been cancelled
i18n - Download Client UI / Client (push) Has been cancelled
i18n - Upload Client UI / Client (push) Has been cancelled
i18n - Upload Curriculum / Learn (push) Has been cancelled
2025-10-07 10:49:41 +05:30
Mrugesh Mohapatra
ef610dd36c
fix(tools): s/MailHog/Mailpit/g (#62481)
Some checks failed
i18n - Build Validation / Validate i18n Builds (22) (push) Has been cancelled
CI - Node.js / Lint (22) (push) Has been cancelled
CI - E2E - 3rd party donation tests / Build Client (22) (push) Has been cancelled
CI - E2E - 3rd party donation tests / Build API (Container) (push) Has been cancelled
CI - Node.js / Build (22) (push) Has been cancelled
CI - Node.js / Test (22) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (22) (push) Has been cancelled
CI - E2E - 3rd party donation tests / Run Playwright 3rd Party Donation Tests (chromium, 22) (push) Has been cancelled
2025-10-03 13:25:33 -07:00
Oliver Eyton-Williams
bed3811952
feat(api): migrate to esm (#61915) 2025-09-19 13:28:06 +05:30
Mrugesh Mohapatra
45c098d506
feat(api): s/jest/vitest/g (#61863)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2025-08-25 22:57:56 +05:30
Shaun Hamilton
db9b7d2358
chore(api): prevent non-staff exam authz token gen on staging (#61786)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
2025-08-13 21:03:14 +05:30
Shaun Hamilton
d88691bc8a
breaking(api): remove screenshot api (#61300)
Some checks failed
CI - E2E - 3rd party donation tests / Build Client (22) (push) Has been cancelled
CI - E2E - 3rd party donation tests / Build API (Container) (push) Has been cancelled
CI - Node.js / Lint (22) (push) Has been cancelled
CI - E2E - 3rd party donation tests / Run Playwright 3rd Party Donation Tests (chromium, 22) (push) Has been cancelled
CI - Node.js / Build (22) (push) Has been cancelled
CI - Node.js / Test (22) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (22) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 22) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 22) (push) Has been cancelled
2025-07-22 08:28:13 -07:00
Mrugesh Mohapatra
ff43f3aeca
fix(api): whitespace in default values (#60199) 2025-05-07 01:52:42 +05:30
Mrugesh Mohapatra
008e35d851
fix(api): update logging (#60187) 2025-05-06 20:46:36 +05:30
Oliver Eyton-Williams
cc1b31f59d
chore(api): throw if growthbook env vars are missing (#59873) 2025-04-22 07:41:09 +00:00
Mrugesh Mohapatra
ae720e8282
feat(api): add deployment version endpoint (#59841) 2025-04-21 14:30:20 -05:00
Niraj Nandish
dac7fa3a14
feat(api): exam screenshot service (#56940)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2025-02-18 09:24:54 +00:00
Mrugesh Mohapatra
32eca01d3d
fix(api): improve logging
Some checks failed
CI - E2E - 3rd party donation tests / Build & Test (20.x) (push) Has been cancelled
CI - Node.js / Lint (20.x) (push) Has been cancelled
CI - Node.js / Build (20.x) (push) Has been cancelled
CI - Node.js / Test (20.x) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 20.x) (push) Has been cancelled
2025-01-27 18:47:45 +05:30
Shaun Hamilton
7760309f93
fix(api): only treat undefined as unset (#58120) 2025-01-14 09:37:52 -08:00
Shaun Hamilton
9adc0a621d
feat(api): add growthbook (#57950) 2025-01-08 15:35:58 -08:00
Oliver Eyton-Williams
56e520b2e4
refactor(api): provide default env values (#57986) 2025-01-08 21:39:40 +05:30
Oliver Eyton-Williams
d3cfb8ed0f
fix(api): make log level + flags optional (#57978) 2025-01-07 17:52:21 +02:00
Shaun Hamilton
a477643d7d
chore(api): add log level configuration 2025-01-02 18:21:55 +05:30
Shaun Hamilton
55deb556ce
feat(api): add sentry event route 2025-01-02 18:21:54 +05:30
Mrugesh Mohapatra
4d4e617b7d
fix(sentry): use environments 2025-01-02 18:21:54 +05:30
Shaun Hamilton
423db476de
chore(api): enable exam environment endpoints in prod (#57604) 2024-12-19 15:13:39 +05:30
Oliver Eyton-Williams
f2ec6d6dd5
feat(api): env var to control exam environment (#56701) 2024-10-16 21:48:04 +02:00
Shaun Hamilton
7f1a6e553f
chore(api): add request/response shadow dev tool (#56628) 2024-10-11 09:32:20 -07:00
Lars Kappert
d32e57813e
chore: update Knip to v5 (#56244) 2024-09-26 13:12:00 +02:00
Oliver Eyton-Williams
e94080add5
feat(api): implement authorization code flow in the new api (#55413) 2024-07-24 20:08:10 +03:00
Oliver Eyton-Williams
5fcdfe0ec2
fix(api): control host with env var (#55439) 2024-07-08 18:09:18 +05:30
Oliver Eyton-Williams
4c412bff9a
chore(api): remove unused session handling (#55240) 2024-06-20 20:18:16 +02:00
Oliver Eyton-Williams
6fe2b0811f
fix(mailhog): use docker network address in containers (#54877) 2024-05-23 11:21:32 +02:00
Oliver Eyton-Williams
84a81c842b
fix(api): remove cookie domain in development (#54518) 2024-04-26 08:32:46 -07: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
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
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
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
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