Skip to content
Closed
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ static async Task<IResult> CreateDatAsync(DtoObjectPost request, [FromServices]
if (db.DoesObjectExist(hdrs.S5.Name, hdrs.S5.Checksum, out var existingObject))
{
// todo: if we get here - the object doesn't exist but the dat object does - we should then link them
// save changes first to persist any missing object removal
if (missingEntry != null)
{
_ = await db.SaveChangesAsync();
}

return Results.Accepted($"Object already exists in the database. DatName={hdrs.S5.Name} DatChecksum={hdrs.S5.Checksum} UploadedDate={existingObject!.UploadedDate}");
}

Expand Down