Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挕 Created PBIs from TODOs #75

Merged
merged 3 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Application/Common/Interfaces/IDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

public interface IDateTime
{
// TODO: Talk to Gordon about this - System Clock
public DateTimeOffset Now => DateTimeOffset.UtcNow;
}
4 changes: 2 additions & 2 deletions src/Domain/Common/AuditableEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public abstract class AuditableEntity
{
public DateTimeOffset CreatedAt { get; set; }
public string? CreatedBy { get; set; } // TODO: String as userId?
public string? CreatedBy { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public string? UpdatedBy { get; set; } // TODO: String as userId?
public string? UpdatedBy { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
锘縰sing Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SSW.CleanArchitecture.Domain.Entities;

namespace SSW.CleanArchitecture.Infrastructure.Persistence.Configuration;

public class TodoItemConfiguration : IEntityTypeConfiguration<TodoItem>
{
// TODO: Rip out the common pieces that are from BaseEntity
// virtual method, override
// Good marker to enforce that all entities have configuration defined via arch tests
public void Configure(EntityTypeBuilder<TodoItem> builder)
{
builder.HasKey(t => t.Id);
Expand Down
3 changes: 0 additions & 3 deletions src/WebApi/Features/TodoItemEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ public static void MapTodoItemEndpoints(this WebApplication app)
.WithName("GetTodoItems")
.ProducesGet<TodoItemDto[]>();

// TODO: Investigate examples for swagger docs. i.e. better docs than:
// myWeirdField: "string" vs myWeirdField: "this-silly-string"

group
.MapPost("/", (ISender sender, CreateTodoItemCommand command, CancellationToken ct) => sender.Send(command, ct))
.WithName("CreateTodoItem")
Expand Down
3 changes: 0 additions & 3 deletions src/WebApi/Filters/ExceptionFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ await context

private static IResult HandleException(this HttpContext context, Exception exception)
{
// TODO: Null exception possibly?

var type = exception.GetType();

if (ExceptionHandlers.ContainsKey(type))
return ExceptionHandlers[type].Invoke(context, exception);

// TODO: Testing around unhandled exceptions
return Results.Problem(statusCode: StatusCodes.Status500InternalServerError,
type: "https://tools.ietf.org/html/rfc7231#section-6.6.1");
}
Expand Down