From cec8f42ecea12e0c1001a9ec6a2f5482a00d4919 Mon Sep 17 00:00:00 2001 From: Anatolii Grynchuk Date: Sat, 2 May 2026 01:58:14 +0300 Subject: [PATCH] refactor: move REST API controllers into Controllers/Api subfolder - Prepares Controllers/ for both Api/ and Admin/ groupings - Namespaces updated accordingly Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Controllers/{ => Api}/ApiControllerBase.cs | 2 +- .../{ => Api}/EmailChannels/CreateEmailChannelRequest.cs | 2 +- .../{ => Api}/EmailChannels/EmailChannelsController.cs | 2 +- .../{ => Api}/EmailChannels/UpdateEmailChannelRequest.cs | 2 +- .../{ => Api}/EmailTemplates/CreateEmailTemplateRequest.cs | 2 +- .../{ => Api}/EmailTemplates/EmailTemplatesController.cs | 2 +- .../{ => Api}/EmailTemplates/UpdateEmailTemplateRequest.cs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/ApiControllerBase.cs (96%) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/EmailChannels/CreateEmailChannelRequest.cs (81%) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/EmailChannels/EmailChannelsController.cs (97%) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/EmailChannels/UpdateEmailChannelRequest.cs (77%) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/EmailTemplates/CreateEmailTemplateRequest.cs (79%) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/EmailTemplates/EmailTemplatesController.cs (97%) rename HrynCo.NotificationService.Web/Controllers/{ => Api}/EmailTemplates/UpdateEmailTemplateRequest.cs (75%) diff --git a/HrynCo.NotificationService.Web/Controllers/ApiControllerBase.cs b/HrynCo.NotificationService.Web/Controllers/Api/ApiControllerBase.cs similarity index 96% rename from HrynCo.NotificationService.Web/Controllers/ApiControllerBase.cs rename to HrynCo.NotificationService.Web/Controllers/Api/ApiControllerBase.cs index e385d28..2b9eff5 100644 --- a/HrynCo.NotificationService.Web/Controllers/ApiControllerBase.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/ApiControllerBase.cs @@ -3,7 +3,7 @@ using HrynCo.NotificationService.Services.Core; using MediatR; using Microsoft.AspNetCore.Mvc; -namespace HrynCo.NotificationService.Web.Controllers; +namespace HrynCo.NotificationService.Web.Controllers.Api; [Route("api/v1/[controller]")] [ApiController] diff --git a/HrynCo.NotificationService.Web/Controllers/EmailChannels/CreateEmailChannelRequest.cs b/HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/CreateEmailChannelRequest.cs similarity index 81% rename from HrynCo.NotificationService.Web/Controllers/EmailChannels/CreateEmailChannelRequest.cs rename to HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/CreateEmailChannelRequest.cs index 7bb6aa0..b49e70a 100644 --- a/HrynCo.NotificationService.Web/Controllers/EmailChannels/CreateEmailChannelRequest.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/CreateEmailChannelRequest.cs @@ -1,6 +1,6 @@ using HrynCo.NotificationService.DAL.Abstract.Providers; -namespace HrynCo.NotificationService.Web.Controllers.EmailChannels; +namespace HrynCo.NotificationService.Web.Controllers.Api.EmailChannels; public sealed record CreateEmailChannelRequest( string ServiceName, diff --git a/HrynCo.NotificationService.Web/Controllers/EmailChannels/EmailChannelsController.cs b/HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/EmailChannelsController.cs similarity index 97% rename from HrynCo.NotificationService.Web/Controllers/EmailChannels/EmailChannelsController.cs rename to HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/EmailChannelsController.cs index 21695c5..f6d1264 100644 --- a/HrynCo.NotificationService.Web/Controllers/EmailChannels/EmailChannelsController.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/EmailChannelsController.cs @@ -7,7 +7,7 @@ using HrynCo.NotificationService.Services.EmailChannels.Update; using MediatR; using Microsoft.AspNetCore.Mvc; -namespace HrynCo.NotificationService.Web.Controllers.EmailChannels; +namespace HrynCo.NotificationService.Web.Controllers.Api.EmailChannels; [Route("api/v1/email-channels")] public sealed class EmailChannelsController : ApiControllerBase diff --git a/HrynCo.NotificationService.Web/Controllers/EmailChannels/UpdateEmailChannelRequest.cs b/HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/UpdateEmailChannelRequest.cs similarity index 77% rename from HrynCo.NotificationService.Web/Controllers/EmailChannels/UpdateEmailChannelRequest.cs rename to HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/UpdateEmailChannelRequest.cs index cfd241e..7c36e69 100644 --- a/HrynCo.NotificationService.Web/Controllers/EmailChannels/UpdateEmailChannelRequest.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/EmailChannels/UpdateEmailChannelRequest.cs @@ -1,6 +1,6 @@ using HrynCo.NotificationService.DAL.Abstract.Providers; -namespace HrynCo.NotificationService.Web.Controllers.EmailChannels; +namespace HrynCo.NotificationService.Web.Controllers.Api.EmailChannels; public sealed record UpdateEmailChannelRequest( int Priority, diff --git a/HrynCo.NotificationService.Web/Controllers/EmailTemplates/CreateEmailTemplateRequest.cs b/HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/CreateEmailTemplateRequest.cs similarity index 79% rename from HrynCo.NotificationService.Web/Controllers/EmailTemplates/CreateEmailTemplateRequest.cs rename to HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/CreateEmailTemplateRequest.cs index 169cbbc..c63f520 100644 --- a/HrynCo.NotificationService.Web/Controllers/EmailTemplates/CreateEmailTemplateRequest.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/CreateEmailTemplateRequest.cs @@ -1,6 +1,6 @@ using HrynCo.NotificationService.DAL.Abstract.Templates; -namespace HrynCo.NotificationService.Web.Controllers.EmailTemplates; +namespace HrynCo.NotificationService.Web.Controllers.Api.EmailTemplates; public sealed record CreateEmailTemplateRequest( string ServiceName, diff --git a/HrynCo.NotificationService.Web/Controllers/EmailTemplates/EmailTemplatesController.cs b/HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/EmailTemplatesController.cs similarity index 97% rename from HrynCo.NotificationService.Web/Controllers/EmailTemplates/EmailTemplatesController.cs rename to HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/EmailTemplatesController.cs index c378b31..30bd332 100644 --- a/HrynCo.NotificationService.Web/Controllers/EmailTemplates/EmailTemplatesController.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/EmailTemplatesController.cs @@ -7,7 +7,7 @@ using HrynCo.NotificationService.Services.EmailTemplates.Update; using MediatR; using Microsoft.AspNetCore.Mvc; -namespace HrynCo.NotificationService.Web.Controllers.EmailTemplates; +namespace HrynCo.NotificationService.Web.Controllers.Api.EmailTemplates; [Route("api/v1/email-templates")] public sealed class EmailTemplatesController : ApiControllerBase diff --git a/HrynCo.NotificationService.Web/Controllers/EmailTemplates/UpdateEmailTemplateRequest.cs b/HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/UpdateEmailTemplateRequest.cs similarity index 75% rename from HrynCo.NotificationService.Web/Controllers/EmailTemplates/UpdateEmailTemplateRequest.cs rename to HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/UpdateEmailTemplateRequest.cs index c647063..20eefd5 100644 --- a/HrynCo.NotificationService.Web/Controllers/EmailTemplates/UpdateEmailTemplateRequest.cs +++ b/HrynCo.NotificationService.Web/Controllers/Api/EmailTemplates/UpdateEmailTemplateRequest.cs @@ -1,6 +1,6 @@ using HrynCo.NotificationService.DAL.Abstract.Templates; -namespace HrynCo.NotificationService.Web.Controllers.EmailTemplates; +namespace HrynCo.NotificationService.Web.Controllers.Api.EmailTemplates; public sealed record UpdateEmailTemplateRequest( string Subject,