Skip to content

Commit

Permalink
💡 Created PBIs from TODOs (#75)
Browse files Browse the repository at this point in the history
Created PBIs from TODOs
  • Loading branch information
danielmackay committed May 23, 2023
1 parent 591fdc5 commit 3e565f7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Application/Common/Interfaces/IDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public interface IDateTime
{
// TODO: Talk to Gordon about this - System Clock
// TODO: Talk to Gordon about this - System Clock (https://github.com/SSWConsulting/SSW.CleanArchitecture/issues/77)
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; } // TODO: String as userId? (https://github.com/SSWConsulting/SSW.CleanArchitecture/issues/76)
public DateTimeOffset? UpdatedAt { get; set; }
public string? UpdatedBy { get; set; } // TODO: String as userId?
public string? UpdatedBy { get; set; } // TODO: String as userId? (https://github.com/SSWConsulting/SSW.CleanArchitecture/issues/76)
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using 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
// TODO: Rip out the common pieces that are from BaseEntity (https://github.com/SSWConsulting/SSW.CleanArchitecture/issues/78)
// virtual method, override
// Good marker to enforce that all entities have configuration defined via arch tests
public void Configure(EntityTypeBuilder<TodoItem> builder)
Expand Down
1 change: 1 addition & 0 deletions src/WebApi/Features/TodoItemEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static void MapTodoItemEndpoints(this WebApplication app)

// TODO: Investigate examples for swagger docs. i.e. better docs than:
// myWeirdField: "string" vs myWeirdField: "this-silly-string"
// (https://github.com/SSWConsulting/SSW.CleanArchitecture/issues/79)

group
.MapPost("/", (ISender sender, CreateTodoItemCommand command, CancellationToken ct) => sender.Send(command, ct))
Expand Down
4 changes: 1 addition & 3 deletions src/WebApi/Filters/ExceptionFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ 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
// TODO: Testing around unhandled exceptions (https://github.com/SSWConsulting/SSW.CleanArchitecture/issues/80)
return Results.Problem(statusCode: StatusCodes.Status500InternalServerError,
type: "https://tools.ietf.org/html/rfc7231#section-6.6.1");
}
Expand Down

0 comments on commit 3e565f7

Please sign in to comment.