mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
FriendsController
This commit is contained in:
@@ -16,6 +16,8 @@ public class FriendshipValidator : IObjectValidator<Friendship>
|
||||
throw new ArgumentException("Addresses cannot be empty", nameof(friendship.AddresseeId));
|
||||
if(friendship.RequesterId == Guid.Empty)
|
||||
throw new ArgumentException("Requester cannot be empty", nameof(friendship.RequesterId));
|
||||
if(friendship.AddresseeId == friendship.RequesterId)
|
||||
throw new ArgumentException("Addresses cannot be same", nameof(friendship.AddresseeId));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -9,5 +9,6 @@ public interface IUsersReader
|
||||
public Task<List<User>> FindByRangeIdAsync(IEnumerable<Guid> ids);
|
||||
public Task<User> FindByUsernameAsync(string username);
|
||||
public Task<List<User>> FindByRangeUsernamesAsync(IEnumerable<string> usernames);
|
||||
public Task<List<User>> SearchPotentialFriendsAsync(Guid currentUserId, string query);
|
||||
public Task<List<User>> FindUsersByCreatedDateAsync(DateOnly createdDate);
|
||||
}
|
||||
Reference in New Issue
Block a user