diff options
| 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 |
| commit | 97459890f8c25b1af2a17109055afea53ee0b280 (patch) | |
| tree | c5bf710a4dd1edc7174d20a0141bbf7c8a48e9dc /src/Services/DevHive.Services | |
| parent | 4add0831649f6e534d3883aa0e0e7f380d8042c7 (diff) | |
| download | DevHive-97459890f8c25b1af2a17109055afea53ee0b280.tar DevHive-97459890f8c25b1af2a17109055afea53ee0b280.tar.gz DevHive-97459890f8c25b1af2a17109055afea53ee0b280.zip | |
When user has no friends, returned feed is just an empty array, rather than throwing an exception
Diffstat (limited to 'src/Services/DevHive.Services')
| -rw-r--r-- | src/Services/DevHive.Services/Services/FeedService.cs | 3 |
1 files changed, 0 insertions, 3 deletions
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); |
