aboutsummaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Api/Api/Services/UserService.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/Backend/Api/Api/Services/UserService.cs b/Backend/Api/Api/Services/UserService.cs
index 8597503..781afa8 100644
--- a/Backend/Api/Api/Services/UserService.cs
+++ b/Backend/Api/Api/Services/UserService.cs
@@ -360,6 +360,10 @@ namespace Api.Services
tosend._id= user._id;
tosend.creationDate = user.creationDate;
tosend.email="";
+ tosend.followersCount = user.followersCount;
+ tosend.followingCount = user.followingCount;
+ tosend.followers = user.followers;
+ tosend.following = user.following;
var userposts = await _posts.Find(x => x.ownerId == user._id).ToListAsync();
tosend.postcount = userposts.Count();
return tosend;
@@ -376,6 +380,10 @@ namespace Api.Services
tosend._id = user._id;
tosend.creationDate = user.creationDate;
tosend.email = user.email;
+ tosend.followersCount = user.followersCount;
+ tosend.followingCount = user.followingCount;
+ tosend.followers = user.followers;
+ tosend.following = user.following;
var userposts = await _posts.Find(x => x.ownerId == user._id).ToListAsync();
tosend.postcount = userposts.Count();
return tosend;
@@ -466,6 +474,9 @@ namespace Api.Services
follower.email = utemp.username;
follower.following = utemp.following;
follower.followers = utemp.followers;
+ follower.followersCount = utemp.followersCount;
+ follower.followingCount = utemp.followingCount;
+
follower._id = utemp._id;
followers.Add((UserSend)follower);
@@ -502,6 +513,8 @@ namespace Api.Services
follower.following = utemp.following;
follower.followers = utemp.followers;
follower._id = utemp._id;
+ follower.followersCount = utemp.followersCount;
+ follower.followingCount = utemp.followingCount;
following.Add((UserSend)follower);
}
@@ -543,6 +556,8 @@ namespace Api.Services
following.following = utemp.following;
following.followers = utemp.followers;
following._id = utemp._id;
+ following.followersCount = utemp.followersCount;
+ following.followingCount = utemp.followingCount;
myFollowings.Add((UserSend)following);
}
@@ -654,8 +669,9 @@ namespace Api.Services
follower.email = utemp.username;
follower.following = utemp.following;
follower.followers = utemp.followers;
+ follower.followersCount = utemp.followersCount;
+ follower.followingCount = utemp.followingCount;
follower._id = utemp._id;
-
myfollowers.Add((UserSend)follower);
}
return myfollowers;