mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
added user config for dark mode and navigation
This commit is contained in:
parent
1d7ecc3efa
commit
40af926104
7 changed files with 82 additions and 16 deletions
|
|
@ -32,11 +32,20 @@ Meteor.methods({
|
|||
throw new Meteor.Error('Not able to change registration setting. Make sure you are logged in with valid system administrator credentials.');
|
||||
}
|
||||
|
||||
return UserConfig.update({ user: this.userId }, {
|
||||
$set: {
|
||||
darkMode: pref,
|
||||
dateUpdate: Date()
|
||||
}
|
||||
});
|
||||
let myConfig = UserConfig.findOne({ user: this.userId });
|
||||
if (typeof myConfig == 'undefined') {
|
||||
Meteor.call('add.darkModePref', pref, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR calling the add functioin for dark mode: " + err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return UserConfig.update({ user: this.userId }, {
|
||||
$set: {
|
||||
darkMode: pref,
|
||||
dateUpdate: Date()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue