diff --git a/src/Web.Api/Domain/Accounts/UserAccount.cs b/src/Web.Api/Domain/Accounts/UserAccount.cs index 40a8af6..91c8efd 100644 --- a/src/Web.Api/Domain/Accounts/UserAccount.cs +++ b/src/Web.Api/Domain/Accounts/UserAccount.cs @@ -17,9 +17,8 @@ private UserAccount() { } - public Guid Id { get; private set; } public string FullName { get; private set; } - public List Calendars { get; private set; } = new List(); + public List Calendars { get; private set; } = []; public bool IsActive { get; private set; } public bool IsDeleted { get; private set; } @@ -31,4 +30,4 @@ public static UserAccount Create(string fullName) return userAccount; } -} +} \ No newline at end of file diff --git a/src/Web.Api/Domain/Calendars/Calendar.cs b/src/Web.Api/Domain/Calendars/Calendar.cs index a0174e2..4aceb5e 100644 --- a/src/Web.Api/Domain/Calendars/Calendar.cs +++ b/src/Web.Api/Domain/Calendars/Calendar.cs @@ -15,7 +15,6 @@ private Calendar() { } - public Guid Id { get; private set; } public string Name { get; private set; } public Guid UserAccountId { get; private set; } public UserAccount UserAccount { get; private set; } = null!; diff --git a/src/Web.Api/Features/Accounts/CreateAccount.cs b/src/Web.Api/Features/Accounts/CreateAccount.cs index 88262d2..f6d09bc 100644 --- a/src/Web.Api/Features/Accounts/CreateAccount.cs +++ b/src/Web.Api/Features/Accounts/CreateAccount.cs @@ -12,10 +12,12 @@ public class CreateAccountEndpoint : ICarterModule { public void AddRoutes(IEndpointRouteBuilder app) { - app.MapPost("api/accounts", async (CreateAccount.Command request, ISender sender, CancellationToken cancellationToken) => + app.MapPost("api/accounts", async ( + CreateAccount.Command request, + ISender sender, + CancellationToken cancellationToken) => { var result = await sender.Send(request, cancellationToken); - if (result.IsFailure) { return Results.BadRequest(result.Error); @@ -67,4 +69,4 @@ public async Task> Handle(Command request, Cancell return new CreateAccountResponse(userAccount.Id, userAccount.FullName); } } -} +} \ No newline at end of file diff --git a/src/Web.Api/Features/Accounts/GetAccount.cs b/src/Web.Api/Features/Accounts/GetAccount.cs index 67d4993..3b4f3dd 100644 --- a/src/Web.Api/Features/Accounts/GetAccount.cs +++ b/src/Web.Api/Features/Accounts/GetAccount.cs @@ -53,5 +53,4 @@ public async Task> Handle(Query request, Cancellation return new GetAccountResponse(account.Id, account.FullName); } } -} - +} \ No newline at end of file