Skip to content

Commit

Permalink
some tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcrane committed Jan 19, 2024
1 parent de749ea commit 8ab9960
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LeedsExperiment/Preservation.API/Controllers/ImportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,24 @@ IAmazonS3 awsS3Client
this.s3Client = awsS3Client;
}

[HttpGet(Name = "ImportJob")]
[Route("{*path}")]
public async Task<ImportJob?> GetImportJob([FromRoute] string path, [FromQuery] string? source)
{
// build an import job, with checksums etc, set diffversion, time it.
// compare the source with the object and build the diff properties.
return null;
}


[HttpPost(Name = "ExecuteImport")]
[Route("__import")]
public async Task<ImportJob?> ExecuteImportJob([FromBody] ImportJob importJob)
{
// enter a transaction, check the version is the same, do all the stuff it says in the diffs, end transaction
// keep a log of the updates (populate the *added props)
// get the AG again, see the version, validate it's one on etc
// return the import job
return null;
}
}

0 comments on commit 8ab9960

Please sign in to comment.