feat: store sound settings in local storage (#51374)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Riya Dhawan
2023-09-19 21:47:51 +05:30
committed by GitHub
parent e149b09087
commit c12f4bfd45
11 changed files with 7 additions and 39 deletions

View File

@@ -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 }) =>

View File

@@ -50,7 +50,6 @@ export const userPropsForSession = [
'id',
'sendQuincyEmail',
'theme',
'sound',
'keyboardShortcuts',
'completedChallengeCount',
'acceptedPrivacyTerms'