Authored by yyq

channel newuser

@@ -86,8 +86,13 @@ exports.getIndexGuide = (req, res, next) => { @@ -86,8 +86,13 @@ exports.getIndexGuide = (req, res, next) => {
86 }; 86 };
87 87
88 exports.hasNewUserFloor = (req, res, next) => { 88 exports.hasNewUserFloor = (req, res, next) => {
  89 + let uid = req.user.uid;
89 90
90 - channelModel.hasNewUserFloor(req.yoho.channel, req.user.uid).then(data => { 91 + if (!uid) {
  92 + return res.send({code: 200, isNewUser: false});
  93 + }
  94 +
  95 + channelModel.hasNewUserFloor(req.yoho.channel, uid).then(data => {
91 res.send(data); 96 res.send(data);
92 }).catch(next); 97 }).catch(next);
93 }; 98 };