test to make server

This commit is contained in:
Artemy
2026-02-08 22:30:29 +07:00
parent cc2921d257
commit 0a43e35797
56 changed files with 949 additions and 442 deletions
@@ -42,6 +42,14 @@ public class PrivateChatsRepository : IPrivateChatsRepository
?? throw new NotFoundByKeyException<(Guid, Guid)>((memberAId, memberBId), "Private Chat with given members Id's does not exist");
}
public async Task<List<PrivateChat>> GetAllOfUser(Guid userId)
{
return await _context.PrivateChats
.AsNoTracking()
.Where(f => f.UserAId == userId || f.UserBId == userId)
.ToListOrThrowIfEmpty(new NotFoundByKeyException<Guid>(userId, "Private Chat with given member Id's does not exist"));
}
public async Task AddAsync(PrivateChat chat)
{
try