fix: post queue notifs

fix moderators not showing up immediately when adding them
This commit is contained in:
Barış Soner Uşaklı
2019-01-14 22:38:15 -05:00
parent 2614a2e5ce
commit ac655564bb
2 changed files with 2 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ define('admin/manage/admins-mods', ['translator', 'benchpress', 'autocomplete'],
return; return;
} }
app.parseAndTranslate('admin/manage/admins-mods', 'globalMods', { globalMods: [ui.item.user] }, function (html) { app.parseAndTranslate('admin/manage/admins-mods', 'globalMods.members', { globalMods: { members: [ui.item.user] } }, function (html) {
$('.moderator-area[data-cid="' + cid + '"]').prepend(html); $('.moderator-area[data-cid="' + cid + '"]').prepend(html);
$('.no-moderator-warning[data-cid="' + cid + '"]').addClass('hidden'); $('.no-moderator-warning[data-cid="' + cid + '"]').addClass('hidden');
}); });

View File

@@ -67,7 +67,7 @@ module.exports = function (Posts) {
], next); ], next);
}, },
function (results, next) { function (results, next) {
next(null, _.union(results)); next(null, _.uniq(_.flattenDeep(results)));
}, },
], callback); ], callback);
} }