Use new AudibleApi methods

This commit is contained in:
MBucari 2023-03-13 21:00:25 -06:00
parent 1149c10cf1
commit defabf7356
2 changed files with 3 additions and 23 deletions

View file

@ -213,12 +213,13 @@ namespace ApplicationServices
if (archiver is not null)
{
var fileName = $"{DateTime.Now:u} {account.MaskedLogEntry}.json";
var items = await Task.Run(() => JArray.FromObject(dtoItems.Select(i => i.SourceJson)));
var scanFile = new JObject
{
{ "Account", account.MaskedLogEntry },
{ "ScannedDateTime", DateTime.Now.ToString("u") },
{ "Items", await Task.Run(() => JArray.FromObject(dtoItems.Select(i => i.SourceJson))) }
{ "Items", items}
};
await archiver.AddFileAsync(fileName, scanFile);