This commit is contained in:
syuilo 2017-11-01 04:28:53 +09:00
parent d6d9b04157
commit 5cd7c59f7b

View file

@ -228,11 +228,13 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => {
// -----------------------------------------------------------
// Post processes
Channel.update({ _id: channel._id }, {
$inc: {
index: 1
}
});
if (channel) {
Channel.update({ _id: channel._id }, {
$inc: {
index: 1
}
});
}
User.update({ _id: user._id }, {
$set: {