mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
* Rework user.js and User object to ES6
* Update download stats for user when web download is completed
This commit is contained in:
parent
6406d32165
commit
058ff3f367
14 changed files with 569 additions and 516 deletions
|
@ -196,19 +196,18 @@ function initialize(cb) {
|
|||
// * We do this every time as the op is free to change this information just
|
||||
// like any other user
|
||||
//
|
||||
const user = require('./user.js');
|
||||
const User = require('./user.js');
|
||||
|
||||
async.waterfall(
|
||||
[
|
||||
function getOpUserName(next) {
|
||||
return user.getUserName(1, next);
|
||||
return User.getUserName(1, next);
|
||||
},
|
||||
function getOpProps(opUserName, next) {
|
||||
const propLoadOpts = {
|
||||
userId : 1,
|
||||
names : [ 'real_name', 'sex', 'email_address', 'location', 'affiliation' ],
|
||||
};
|
||||
user.loadProperties(propLoadOpts, (err, opProps) => {
|
||||
User.loadProperties(User.RootUserID, propLoadOpts, (err, opProps) => {
|
||||
return next(err, opUserName, opProps);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue