mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
feat: fix blocksCount not being returned on user profile
add hook action:user.blocks.toggle
This commit is contained in:
@@ -50,6 +50,7 @@ define('forum/account/blocks', ['forum/account/header'], function (header) {
|
||||
$('#users-container').html(html);
|
||||
$('#users-container').siblings('div.alert')[html.length ? 'hide' : 'show']();
|
||||
});
|
||||
$(window).trigger('action:user.blocks.toggle', { data: payload });
|
||||
})
|
||||
.fail(function () {
|
||||
ajaxify.go(ajaxify.currentPage);
|
||||
|
||||
@@ -11,8 +11,9 @@ const utils = require('../utils');
|
||||
|
||||
const intFields = [
|
||||
'uid', 'postcount', 'topiccount', 'reputation', 'profileviews',
|
||||
'banned', 'banned:expire', 'email:confirmed', 'joindate', 'lastonline', 'lastqueuetime',
|
||||
'lastposttime', 'followingCount', 'followerCount', 'passwordExpiry',
|
||||
'banned', 'banned:expire', 'email:confirmed', 'joindate', 'lastonline',
|
||||
'lastqueuetime', 'lastposttime', 'followingCount', 'followerCount',
|
||||
'blocksCount', 'passwordExpiry',
|
||||
];
|
||||
|
||||
module.exports = function (User) {
|
||||
@@ -27,8 +28,8 @@ module.exports = function (User) {
|
||||
'lastonline', 'picture', 'fullname', 'location', 'birthday', 'website',
|
||||
'aboutme', 'signature', 'uploadedpicture', 'profileviews', 'reputation',
|
||||
'postcount', 'topiccount', 'lastposttime', 'banned', 'banned:expire',
|
||||
'status', 'flags', 'followerCount', 'followingCount', 'cover:url',
|
||||
'cover:position', 'groupTitle',
|
||||
'status', 'flags', 'followerCount', 'followingCount', 'blocksCount',
|
||||
'cover:url', 'cover:position', 'groupTitle',
|
||||
];
|
||||
|
||||
User.guestData = {
|
||||
|
||||
Reference in New Issue
Block a user