mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-26 04:28:17 +02:00
Work on using UserProps, fix up ISO timestamps, etc.
This commit is contained in:
parent
4bd340a480
commit
b82c640014
10 changed files with 95 additions and 50 deletions
|
@ -1,11 +1,17 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
// ENiGMA½
|
||||
const MenuModule = require('./menu_module.js').MenuModule;
|
||||
const ViewController = require('./view_controller.js').ViewController;
|
||||
const theme = require('./theme.js');
|
||||
const sysValidate = require('./system_view_validate.js');
|
||||
const UserProps = require('./user_property.js');
|
||||
const {
|
||||
getISOTimestampString
|
||||
} = require('./database.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
const assert = require('assert');
|
||||
const _ = require('lodash');
|
||||
|
@ -101,15 +107,15 @@ exports.getModule = class UserConfigModule extends MenuModule {
|
|||
assert(formData.value.password === formData.value.passwordConfirm);
|
||||
|
||||
const newProperties = {
|
||||
real_name : formData.value.realName,
|
||||
birthdate : new Date(Date.parse(formData.value.birthdate)).toISOString(),
|
||||
sex : formData.value.sex,
|
||||
location : formData.value.location,
|
||||
affiliation : formData.value.affils,
|
||||
email_address : formData.value.email,
|
||||
web_address : formData.value.web,
|
||||
term_height : formData.value.termHeight.toString(),
|
||||
theme_id : self.availThemeInfo[formData.value.theme].themeId,
|
||||
[ UserProps.RealName ] : formData.value.realName,
|
||||
[ UserProps.Birthdate ] : getISOTimestampString(formData.value.birthdate),
|
||||
[ UserProps.Sex ] : formData.value.sex,
|
||||
[ UserProps.Location ] : formData.value.location,
|
||||
[ UserProps.Affiliations ] : formData.value.affils,
|
||||
[ UserProps.EmailAddress ] : formData.value.email,
|
||||
[ UserProps.WebAddress ] : formData.value.web,
|
||||
[ UserProps.TermHeight ] : formData.value.termHeight.toString(),
|
||||
[ UserProps.ThemeId ] : self.availThemeInfo[formData.value.theme].themeId,
|
||||
};
|
||||
|
||||
// runtime set theme
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue