mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-07 18:03:49 -05:00
feat: store sound settings in local storage (#51374)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -44,7 +44,6 @@ export default function settingsController(app) {
|
||||
api.put('/update-my-username', ifNoUser401, updateMyUsername);
|
||||
api.put('/update-user-flag', ifNoUser401, updateUserFlag);
|
||||
api.put('/update-my-socials', ifNoUser401, updateMySocials);
|
||||
api.put('/update-my-sound', ifNoUser401, updateMySound);
|
||||
api.put(
|
||||
'/update-my-keyboard-shortcuts',
|
||||
ifNoUser401,
|
||||
@@ -288,16 +287,6 @@ function updateMyTheme(...args) {
|
||||
)(...args);
|
||||
}
|
||||
|
||||
function updateMySound(...args) {
|
||||
const buildUpdate = body => _.pick(body, 'sound');
|
||||
const validate = ({ sound }) => typeof sound === 'boolean';
|
||||
createUpdateUserProperties(
|
||||
buildUpdate,
|
||||
validate,
|
||||
'flash.updated-sound'
|
||||
)(...args);
|
||||
}
|
||||
|
||||
function updateMyKeyboardShortcuts(...args) {
|
||||
const buildUpdate = body => _.pick(body, 'keyboardShortcuts');
|
||||
const validate = ({ keyboardShortcuts }) =>
|
||||
|
||||
@@ -50,7 +50,6 @@ export const userPropsForSession = [
|
||||
'id',
|
||||
'sendQuincyEmail',
|
||||
'theme',
|
||||
'sound',
|
||||
'keyboardShortcuts',
|
||||
'completedChallengeCount',
|
||||
'acceptedPrivacyTerms'
|
||||
|
||||
Reference in New Issue
Block a user