From 3f8add62579c8d8cd16902007bc784b33d053e3d Mon Sep 17 00:00:00 2001 From: griffri Date: Mon, 23 Sep 2024 10:17:57 +0100 Subject: [PATCH] Apply matching created/modified timestamps on creating a storage collection --- .../API/Features/Storage/Requests/CreateCollection.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/IIIFPresentation/API/Features/Storage/Requests/CreateCollection.cs b/src/IIIFPresentation/API/Features/Storage/Requests/CreateCollection.cs index fc18aca..230d16b 100644 --- a/src/IIIFPresentation/API/Features/Storage/Requests/CreateCollection.cs +++ b/src/IIIFPresentation/API/Features/Storage/Requests/CreateCollection.cs @@ -35,11 +35,12 @@ public class CreateCollectionHandler( public async Task> 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(),