Skip to content

Commit

Permalink
Apply matching created/modified timestamps on creating a storage coll…
Browse files Browse the repository at this point in the history
…ection
  • Loading branch information
griffri committed Sep 23, 2024
1 parent 12f3c17 commit 3f8add6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ public class CreateCollectionHandler(

public async Task<ModifyEntityResult<FlatCollection>> Handle(CreateCollection request, CancellationToken cancellationToken)
{
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 3f8add6

Please sign in to comment.