fix: only add blocksCount for self and admins

This commit is contained in:
Barış Soner Uşaklı
2020-07-01 23:16:20 -04:00
parent fd20e5c62c
commit 59a2ace6f7
3 changed files with 3 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID) {
userData.isBlocked = results.isBlocked;
if (isAdmin || isSelf) {
userData.blocksCount = parseInt(userData.blocksCount, 10) || 0;
userData.blocksCount = await user.getUserField(userData.uid, 'blocksCount');
}
userData.yourid = callerUID;