a26f41af18
- ApiResponse<T>, ApiError in Api/Infrastructure - ApiControllerBase with IMediator, FromServiceResult, MapServiceError - EmailTemplatesController: GET list, GET one, POST, PUT, DELETE - EmailChannelsController: GET list, GET one, POST, PUT, DELETE Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
15 lines
354 B
C#
15 lines
354 B
C#
namespace HrynCo.NotificationService.Api.Infrastructure;
|
|
|
|
public sealed class ApiResponse<T>
|
|
{
|
|
public T? Data { get; init; } = default;
|
|
public ApiError? Error { get; init; }
|
|
public bool Success { get; init; }
|
|
}
|
|
|
|
public sealed class ApiError
|
|
{
|
|
public required string Code { get; init; }
|
|
public required string Message { get; init; }
|
|
}
|