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
@@ -0,0 +1,28 @@
using Govor.Application.Interfaces;
using Govor.Core.Models;
using Govor.Core.Repositories.Groups;
using Govor.Data.Repositories.Exceptions;
namespace Govor.Application.Services;
public class UserGroupsGetterService : IUserGroupsGetterService
{
private readonly IGroupsRepository _groupRep;
public UserGroupsGetterService(IGroupsRepository groupsRepository)
{
_groupRep = groupsRepository;
}
public async Task<List<ChatGroup>> GetUserGroupsAsync(Guid userId)
{
try
{
return await _groupRep.GetByUserIdAsync(userId);
}
catch (NotFoundByKeyException<Guid> ex)
{
return new List<ChatGroup>();
}
}
}