Commit Graph

118 Commits

Author SHA1 Message Date
Oliver Eyton-Williams
9bb1cc56f1 fix: stop returning donationEmails (#50623) 2023-06-07 19:08:04 +04:00
Muhammed Mustafa
e368410c89 feat(api): deprecate get account endpoint (#50419) 2023-06-02 08:09:54 +02:00
Oliver Eyton-Williams
f3eb1eccb5 refactor: remove unused parts of api-server (#50513)
* refactor: remove unused parts of api-server
2023-05-30 22:54:19 +07:00
Oliver Eyton-Williams
404d3f1726 refactor(api): stop returning sessionMeta (#50482) 2023-05-30 10:18:47 +02:00
Oliver Eyton-Williams
1fc0bccb6f refactor(api): stop returning streak (#50502)
The client does not use them. It calculates streaks from the calendar
property.
2023-05-24 19:16:29 +03:00
Muhammed Mustafa
4c5363bff0 fix(api-server): a typo in the info message for resubscribe (#50496) 2023-05-24 16:27:26 +02:00
Tom
4dfca3c560 feat: add exam environment (#50356)
* feat: add exam environment

* fix: cypress

* fix: lint-ts

* fix: lint-js

* fix: codefactor

* fix: don't translate comments from new JS spreadsheet

* fix: more tests

* fix: challenge schema

* fix: external curriculum test?

* fix: add more comments
2023-05-18 13:33:43 +02:00
Shaun Hamilton
5eb91a9043 chore(api-server): remove unused is* fields (#50346) 2023-05-10 11:59:40 +02:00
Shaun Hamilton
e30e6d9f55 fix(api-server): check type of email to prevent throw (#50259) 2023-05-03 14:53:28 +02:00
Mrugesh Mohapatra
b8dc4d5393 chore: update error message for Crash Dumps (#50213) 2023-04-28 17:17:55 -07:00
Shaun Hamilton
8300ccb7f0 fix(api-server): return usable flash type to client (#50082) 2023-04-17 23:18:18 +05:30
Muhammed Mustafa
f08fe482d1 feat(api-server): show unique messages from api (#49781)
Show specific messages for API calls
2023-04-17 14:21:25 +01:00
Tom
605fdf220a feat(curriculum): make college algebra with python live (#49695) 2023-03-23 21:57:32 +00:00
Shaun Hamilton
7d01522c0d refactor(api): remove rx from boot/challenge.js (#49387)
* refactor(api): remove rx from `boot/challenge.js`

* fix: pass error to express

* refactor: do not use updated user

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

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-03-16 20:39:28 +05:30
Shaun Hamilton
c030757f03 refactor(api): remove rx from boot/user.js (#49386)
* refactor(api): remove rx from `boot/user.js`

* fix: handle async session user error

* fix lint: do not make changes without npm ci
2023-03-16 20:38:53 +05:30
Tom
b950070f80 feat(curriculum): add college algebra cert as upcoming change (#43605)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-10 10:55:50 +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
Tom
8f63733236 refactor(api): user token db query (#49406) 2023-02-23 17:50:04 +05:30
Mrugesh Mohapatra
c252a84c4d fix(sentry): disable sentry temporarily (#49443) 2023-02-20 17:17:28 +02:00
Mrugesh Mohapatra
537ef39a8d feat(tools): sentry apm and other telemetry (#49385)
* feat(tools): sentry apm and other telemetry

* fix: use middleware json to remove duplication

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-02-17 18:23:18 +05:30
Mrugesh Mohapatra
96a821a2ac revert(tools): sentry apm and other telemetry (#49383)
Revert "feat(tools): sentry apm and other telemetry (#49230)"

This reverts commit b4fa56be3e.
2023-02-14 20:20:01 +05:30
Mrugesh Mohapatra
b4fa56be3e feat(tools): sentry apm and other telemetry (#49230) 2023-02-13 14:32:49 +00:00
Mrugesh Mohapatra
ffc97f15d1 fix(api): update mobile-auth ratelimit config (#49194)
* fix(api): use proper name for collection

* fix(api): use the x-forwarded-for ip address
2023-02-10 13:13:54 +00:00
Mrugesh Mohapatra
9b6042e44d feat: enable mobile auth endpoints (#49298
Reverts #49212
2023-02-09 14:01:13 +05:30
Mrugesh Mohapatra
c3103bae3d revert: mobile auth for unblocking deployments (#49212) 2023-01-31 22:06:17 +05:30
Niraj Nandish
96fc70db1d feat: mobile auth (#48591)
Co-authored-by: sembauke <semboot699@gmail.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-01-27 13:35:48 +05:30
Naomi Carrigan
193e03d286 feat: restrict update flag endpoint (#46314)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Sem Bauke <semboot699@gmail.com>
2023-01-19 16:16:17 +03:00
Ahmad Abdolsaheb
bff61255f9 feat(donation): simplify donation client (#46379)
* feat: unify post payment actions

* feat: handle stripe card error and add donation after auth

* feat: add donation saga stripe test

* feat: add more coverage to stripe tests

* feat: add initial stripe card saga test

* feat: finalize initial stripe card saga test

* feat: add patreon test saga

* feat: test clean up

* feat: do not show processing for Patreon

* feat: normalize donation settings

* feat: turn payment provider/contex to enum

* feat: remove donation-settings.js

* fix: git ignore generated config

* fix: ignore the generate config from everything

* fix: remove types.js

* fix: update linting to include types.js

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-12-20 18:03:06 +05:30
Shaun Hamilton
ec3ee856ec feat(tools): ignore no-unused-vars on underscore (#48386) 2022-11-04 10:43:46 +05:30
Mrugesh Mohapatra
b393d88b9e refactor: s/all-langs/i18n/g (#48258) 2022-10-26 10:08:27 -07:00
Shaun Hamilton
326e00fab8 fix(server): default to log fcc namespaces, unless env set (#48143) 2022-10-21 22:53:04 +05:30
Mrugesh Mohapatra
092d7d04d6 feat(api): add redirect for users blocked by okta (#47992)
* feat(api): add redirect for users blocked by okta

* fix: redirect blocked users immediately

* fix: return early if no userInfo

We can't proceed without it, so we have to ask the user to try again.

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-10-12 20:28:21 +05:30
SADIK KUZU
3522ce6f34 fix(api): write variable names in correct manner (#47883) 2022-10-11 17:25:56 +02:00
Shaun Hamilton
3a4640b678 fix(api): reorder certificate early returns (#47656) 2022-09-29 11:42:34 -07:00
Shaun Hamilton
73c3edb56a fix: certification to private on private timeline (#45562)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-09-29 00:00:22 +05:30
Oliver Eyton-Williams
a2790190b2 refactor: saving portfolio items (#47635) 2022-09-27 21:10:01 +05:30
abe
67217160f6 fix: allow user to add one unsaved item at a time (#47567)
Co-authored-by: kravmaguy <flex4lease@gmail.com>
2022-09-27 12:17:58 +05:30
Oliver Eyton-Williams
71b1d25d54 refactor: stop adding jwt to headers (#46367)
The client never uses the header, so there's no need for the api to set
it.
2022-06-16 09:42:32 -05:00
Oliver Eyton-Williams
3361419e87 fix: set _csrf to be httpOnly (#46366)
There's no need for JS to access it, so we can safely set it to be
httpOnly
2022-06-08 16:54:23 +03:00
Radi Totev
e581bd9081 feat(client): shortcuts legend modal available on pressing the ? key (#45530)
* Add modal texts in translations.json file

* Add shortcuts modal state in redux

* Create shortcuts modal

* Integrate shortcuts modal

* Resolve codefactor.io issues

* Extend list of shortcuts

Based on this comment:
https://github.com/freeCodeCamp/freeCodeCamp/issues/36841#issuecomment-933310078

* Remove temporary placeholder for modal title

* Open modal fom Hotkeys instead of learn.tsx

As suggested in this comment:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101224993

* Complete list in transaltions

* Change shortcut presentation fo better a11y

Use table instead of list items as suggestedin this comment:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101796368

* Add aria-labelledby

* Remove GAnalytics

* Remove leftover style

* Remove table caption

* autofocus on modal close button

* Improve modal a11y

- Add requested changes from https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1104764766
- Leave autofocus and parent div role=dialog changes for later. (https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107754148)

* [WIP] Alllow users to turn off keyboard shortcuts

* Add keyboard shortcuts switch in settings

* Disable shortcuts

* Remove toggle switch description

* Refactor and cleanup

* Remove close button from modal header

Suggested by bbsmooth:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107861091

* Fix lint issues

* Disable shortcuts

* Disable shortcuts by default

* Update challenge output test

* Update challenge-hot-keys test

* Disable shortcuts from inside handlers

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-06-03 09:57:52 -07:00
Ahmad Abdolsaheb
1885b6ad96 fix: handle Sentry donation errors (#46074) 2022-05-19 16:32:11 +02:00
Naomi Carrigan
47b5fe90a3 fix(api): optional chaining on fallback fullstack (#46054)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-05-18 22:05:52 +01:00
Tom
f29c66b0dc fix: simplify savedChallenges update (#46032)
* fix: simplify working

* fix: remove unused

* revert: removal of function still needed
2022-05-18 16:56:47 +02:00
Oliver Eyton-Williams
21709a11cb chore: return 404 for update-my-current-challenge (#46042) 2022-05-18 08:39:52 -05:00
Oliver Eyton-Williams
b8c61bd229 fix: simplify completedChallenges updates (#45862) 2022-05-17 17:37:50 +05:30
Tom
832e504ced fix: user object on account reset (#45929) 2022-05-12 18:27:11 +01:00
Shaun Hamilton
2717581b2f fix(api): add needsModeration flag to user document root (#45921)
* fix(api): add needsModeration flag to user document root

* fix prettiers complaints

* Update api-server/src/common/models/user.json

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

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
2022-05-11 15:30:51 -05:00
Tom
f04fbba22d feat: convert RWD cert projects (#44564)
* feat: convert RWD cert projects

* feat: convert original projects

* fix: add usesMultiFileEditor to meta

* feat: add cypress tests for saving and loading to/from database

* fix: broken cypress tests

* fix: inconsistent variable naming

* fix: missed variable name

* fix: more cypress

* feat: add solutions for english

* fix: ctrl+s to database only if signed in

* fix: prioritize code from db

* refactor: expand the comments slightly
2022-05-05 10:58:14 +02:00
Tristan Toye
dfe5a7fd05 Add Sentry to client for error handling (#43920)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-04-15 09:54:02 -05:00
Mrugesh Mohapatra
9ea7018740 Merge pull request from GHSA-cc3r-grh4-27gj
* feat: restrict update-user-flag endpoint

* feat(api): add dedicated-endpoints for user

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-04-13 20:51:31 +05:30