mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Refactor message service and move tests to Application.Tests
Renamed IMessageService to IMessageCommandService and updated all usages accordingly. Moved and renamed test files from Govor.API.Tests to the new Govor.Application.Tests project, updating namespaces to match. Refactored message-related services and controllers to use the new naming and structure. Added Govor.Application.Tests project to the solution.
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ using Govor.Application.Interfaces.Authentication;
|
||||
using Govor.Core.Infrastructure.Validators;
|
||||
using Govor.Core.Repositories.Admins;
|
||||
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Authentication;
|
||||
|
||||
public class AuthService : IAccountService
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Authentication;
|
||||
public class JwtOption
|
||||
{
|
||||
public string SecretKeу {get; set;}
|
||||
+1
-1
@@ -6,7 +6,7 @@ using Govor.Core.Models;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Authentication;
|
||||
|
||||
public class JwtService : IJwtService
|
||||
{
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using Govor.Core.Infrastructure.Extensions;
|
||||
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Authentication;
|
||||
|
||||
public class PasswordHasher : IPasswordHasher
|
||||
{
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Govor.Application.Interfaces;
|
||||
using Govor.Application.Interfaces.Medias;
|
||||
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Messages;
|
||||
|
||||
public class MediaService : IMediaService
|
||||
{
|
||||
+5
-5
@@ -8,24 +8,24 @@ using Govor.Core.Repositories.PrivateChats;
|
||||
using Govor.Core.Repositories.Users;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Messages;
|
||||
|
||||
public class MessageService : IMessageService
|
||||
public class MessageCommandService : IMessageCommandService
|
||||
{
|
||||
private readonly IMessagesRepository _messagesRepository;
|
||||
private readonly IUsersRepository _usersRepository; // For validating user recipients
|
||||
private readonly IGroupsRepository _groupsRepository; // For validating group recipients and fetching members
|
||||
private readonly IPrivateChatsRepository _privateChats;
|
||||
private readonly IVerifyFriendship _verifyFriendship; // For private messages
|
||||
private readonly ILogger<MessageService> _logger;
|
||||
private readonly ILogger<MessageCommandService> _logger;
|
||||
|
||||
public MessageService(
|
||||
public MessageCommandService(
|
||||
IMessagesRepository messagesRepository,
|
||||
IUsersRepository usersRepository,
|
||||
IGroupsRepository groupsRepository,
|
||||
IVerifyFriendship verifyFriendship,
|
||||
IPrivateChatsRepository privateChats,
|
||||
ILogger<MessageService> logger)
|
||||
ILogger<MessageCommandService> logger)
|
||||
{
|
||||
_messagesRepository = messagesRepository;
|
||||
_usersRepository = usersRepository;
|
||||
+1
-1
@@ -4,7 +4,7 @@ using Govor.Core.Repositories.Groups;
|
||||
using Govor.Core.Repositories.Messages;
|
||||
using Govor.Data.Repositories.Exceptions;
|
||||
|
||||
namespace Govor.Application.Services;
|
||||
namespace Govor.Application.Services.Messages;
|
||||
|
||||
public class MessagesLoader : IMessagesLoader
|
||||
{
|
||||
Reference in New Issue
Block a user