Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit97459890f8c25b1af2a17109055afea53ee0b280 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-03-13 16:34:45 +0200
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-03-13 16:34:45 +0200
Filesc5bf710a4dd1edc7174d20a0141bbf7c8a48e9dc /src
DevHive-97459890f8c25b1af2a17109055afea53ee0b280.tar
DevHive-97459890f8c25b1af2a17109055afea53ee0b280.tar.gz
DevHive-97459890f8c25b1af2a17109055afea53ee0b280.zip
Parent4add0831649f6e534d3883aa0e0e7f380d8042c7 (diff)
When user has no friends, returned feed is just an empty array, rather than throwing an exception
1 files changed, 0 insertions, 3 deletions
-rw-r--r--src/Services/DevHive.Services/Services/FeedService.cs3
diff --git a/src/Services/DevHive.Services/Services/FeedService.cs b/src/Services/DevHive.Services/Services/FeedService.cs
index c16ffae..0af8093 100644
--- a/src/Services/DevHive.Services/Services/FeedService.cs
+++ b/src/Services/DevHive.Services/Services/FeedService.cs
@@ -42,9 +42,6 @@ namespace DevHive.Services.Services
if (user == null)
throw new ArgumentException("User doesn't exist!");
- if (user.Friends.Count == 0)
- throw new ArgumentException("User has no friends to get feed from!");
-
List<Post> posts = await this._feedRepository
.GetFriendsPosts(user.Friends.ToList(), getPageServiceModel.FirstRequestIssued, getPageServiceModel.PageNumber, getPageServiceModel.PageSize);