From 1dafa2854ba02ae3c1a9d7bd858cb16fa9a0e2d4 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 24 Nov 2018 09:39:53 -0700 Subject: [PATCH] Fix initial load introduced last nigth :( --- core/bbs.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/bbs.js b/core/bbs.js index 76b7138b..05168e72 100644 --- a/core/bbs.js +++ b/core/bbs.js @@ -223,28 +223,29 @@ function initialize(cb) { // const User = require('./user.js'); + const propLoadOpts = { + names : [ + UserProps.RealName, UserProps.Sex, UserProps.EmailAddress, + UserProps.Location, UserProps.Affiliations, + ], + }; + async.waterfall( [ function getOpUserName(next) { return User.getUserName(1, next); }, function getOpProps(opUserName, next) { - const propLoadOpts = { - names : [ - UserProps.RealName, UserProps.Sex, UserProps.EmailAddress, - UserProps.Location, UserProps.Affiliations, - ], - }; User.loadProperties(User.RootUserID, propLoadOpts, (err, opProps) => { - return next(err, opUserName, opProps, propLoadOpts); + return next(err, opUserName, opProps); }); - } + }, ], - (err, opUserName, opProps, propLoadOpts) => { + (err, opUserName, opProps) => { const StatLog = require('./stat_log.js'); if(err) { - propLoadOpts.concat('username').forEach(v => { + propLoadOpts.names.concat('username').forEach(v => { StatLog.setNonPeristentSystemStat(`sysop_${v}`, 'N/A'); }); } else {