Skip to content

Commit

Permalink
Ensure matching created/modified values on collection creation
Browse files Browse the repository at this point in the history
  • Loading branch information
griffri committed Sep 23, 2024
1 parent 421c159 commit af14782
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ public async Task<ModifyEntityResult<FlatCollection>> Handle(CreateCollection re
return ModifyEntityResult<FlatCollection>.Failure(
$"The parent collection could not be found", WriteResult.Conflict);
}


var dateCreated = DateTime.UtcNow;
var collection = new Collection()
{
Id = Guid.NewGuid().ToString(),
Created = DateTime.UtcNow,
Modified = DateTime.UtcNow,
Created = dateCreated,
Modified = dateCreated,
CreatedBy = Authorizer.GetUser(),
CustomerId = request.CustomerId,
IsPublic = request.Collection.Behavior.IsPublic(),
Expand Down

0 comments on commit af14782

Please sign in to comment.