fix: always wrap responses in ApiResponse<T>

Success responses now use ApiResponse<T>{ Success=true, Data=T }
instead of returning raw T — consistent shape for all outcomes.

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Anatolii Grynchuk
2026-05-02 01:23:22 +03:00
parent a26f41af18
commit 61130130ff
3 changed files with 13 additions and 3 deletions
@@ -1,3 +1,4 @@
using HrynCo.NotificationService.Api.Infrastructure;
using HrynCo.NotificationService.Services.EmailTemplates.Create;
using HrynCo.NotificationService.Services.EmailTemplates.Delete;
using HrynCo.NotificationService.Services.EmailTemplates.Get;
@@ -48,7 +49,7 @@ public sealed class EmailTemplatesController : ApiControllerBase
return CreatedAtAction(
nameof(Get),
new { serviceName = request.ServiceName, key = request.Key, languageCode = request.LanguageCode },
result.Result
new ApiResponse<Guid> { Success = true, Data = result.Result }
);
}