From 26900abaa6cba962a001b7b2e176ee9787b0c8ad Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 17 Oct 2017 12:05:22 -0700 Subject: [PATCH] added verbose logging --- passport/local-signup.js | 16 ++++++++-------- public/assets/css/general.css | 3 ++- routes/auth-routes.js | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/passport/local-signup.js b/passport/local-signup.js index d72a95f6..177f388c 100644 --- a/passport/local-signup.js +++ b/passport/local-signup.js @@ -11,7 +11,7 @@ module.exports = new PassportLocalStrategy( passReqToCallback: true, // we want to be able to read the post body message parameters in the callback }, (req, username, password, done) => { - logger.debug(`new channel signup request. user: ${username} pass: ${password} .`); + logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`); let userInfo = {}; // server-side validaton of inputs (username, password) @@ -23,37 +23,37 @@ module.exports = new PassportLocalStrategy( userName: username, password: password, }; - logger.debug('userData >', userData); + logger.verbose('userData >', userData); // create user record const channelData = { channelName : `@${username}`, channelClaimId: tx.claim_id, }; - logger.debug('channelData >', channelData); + logger.verbose('channelData >', channelData); // create certificate record const certificateData = { claimId: tx.claim_id, name : `@${username}`, // address, }; - logger.debug('certificateData >', certificateData); + logger.verbose('certificateData >', certificateData); // save user and certificate to db return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]); }) .then(([newUser, newChannel, newCertificate]) => { - logger.debug('user and certificate successfully created'); + logger.verbose('user and certificate successfully created'); logger.debug('user result >', newUser.dataValues); userInfo['id'] = newUser.id; userInfo['userName'] = newUser.userName; - logger.debug('channel result >', newChannel.dataValues); + logger.verbose('channel result >', newChannel.dataValues); userInfo['channelName'] = newChannel.channelName; userInfo['channelClaimId'] = newChannel.channelClaimId; - logger.debug('certificate result >', newCertificate.dataValues); + logger.verbose('certificate result >', newCertificate.dataValues); // associate the instances return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]); }) .then(() => { - logger.debug('user and certificate successfully associated'); + logger.verbose('user and certificate successfully associated'); return db.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName); }) .then(shortChannelId => { diff --git a/public/assets/css/general.css b/public/assets/css/general.css index 2d0d4c09..fae61178 100644 --- a/public/assets/css/general.css +++ b/public/assets/css/general.css @@ -417,7 +417,7 @@ table { } .nav-bar-logo, .nav-bar-title, .nav-bar-link, .nav-bar-subtitle { - padding: 2rem 0.5rem 1.5rem 0.5rem; + padding: 2rem 1rem 1.5rem 1rem; display: inline-block; color: black; } @@ -464,6 +464,7 @@ table { .dropzone:hover, .dropzone--drag-over { border: 2px dashed dodgerblue; cursor: pointer; + background-color: #FCFCFC; } #primary-dropzone-wrapper, #publish-form-wrapper { diff --git a/routes/auth-routes.js b/routes/auth-routes.js index 8350c0e0..c1650009 100644 --- a/routes/auth-routes.js +++ b/routes/auth-routes.js @@ -4,7 +4,7 @@ const passport = require('passport'); module.exports = (app) => { // route for sign up app.post('/signup', passport.authenticate('local-signup'), (req, res) => { - logger.debug('successful signup'); + logger.verbose(`successful signup for ${req.user.channelName}`); res.status(200).json({ success : true, channelName : req.user.channelName,