diff --git a/API/Controllers/DTOs/ActionRecord.cs b/API/Controllers/DTOs/ActionRecord.cs
index 2b0d910..65b64b3 100644
--- a/API/Controllers/DTOs/ActionRecord.cs
+++ b/API/Controllers/DTOs/ActionRecord.cs
@@ -2,6 +2,7 @@ using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using API.Schema.ActionsContext.Actions;
using API.Schema.ActionsContext.Actions.Generic;
+// ReSharper disable UnusedAutoPropertyAccessor.Global
namespace API.Controllers.DTOs;
@@ -11,8 +12,12 @@ public sealed record ActionRecord : Identifiable
{
Action = actionRecord.Action;
PerformedAt = actionRecord.PerformedAt;
- MangaId = actionRecord is IActionWithMangaRecord m ? m.MangaId : null;
- ChapterId = actionRecord is IActionWithChapterRecord c ? c.ChapterId : null;
+ MangaId = actionRecord is IActionWithMangaRecord manga ? manga.MangaId : null;
+ ChapterId = actionRecord is IActionWithChapterRecord chapter ? chapter.ChapterId : null;
+ From = actionRecord is DataMovedActionRecord from ? from.From : null;
+ To = actionRecord is DataMovedActionRecord to ? to.To : null;
+ Filename = actionRecord is CoverDownloadedActionRecord filename ? filename.Filename : null;
+ MetadataFetcher = actionRecord is MetadataUpdatedActionRecord metadata ? metadata.MetadataFetcher : null;
}
///
@@ -38,4 +43,28 @@ public sealed record ActionRecord : Identifiable
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ChapterId { get; init; }
+
+ ///
+ /// FromPath if Record is
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? From { get; init; }
+
+ ///
+ /// ToPath if Record is
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? To { get; init; }
+
+ ///
+ /// Filename if Record is
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? Filename { get; init; }
+
+ ///
+ /// if Record is
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ public string? MetadataFetcher { get; init; }
}
\ No newline at end of file
diff --git a/API/openapi/API_v2.json b/API/openapi/API_v2.json
index fc90b12..a7ab9a1 100644
--- a/API/openapi/API_v2.json
+++ b/API/openapi/API_v2.json
@@ -3285,6 +3285,26 @@
"description": "ChapterId if Record is API.Schema.ActionsContext.Actions.Generic.IActionWithMangaRecord",
"nullable": true
},
+ "from": {
+ "type": "string",
+ "description": "FromPath if Record is API.Schema.ActionsContext.Actions.DataMovedActionRecord",
+ "nullable": true
+ },
+ "to": {
+ "type": "string",
+ "description": "ToPath if Record is API.Schema.ActionsContext.Actions.DataMovedActionRecord",
+ "nullable": true
+ },
+ "filename": {
+ "type": "string",
+ "description": "Filename if Record is API.Schema.ActionsContext.Actions.CoverDownloadedActionRecord",
+ "nullable": true
+ },
+ "metadataFetcher": {
+ "type": "string",
+ "description": "API.Schema.MangaContext.MetadataFetchers.MetadataFetcher if Record is API.Schema.ActionsContext.Actions.MetadataUpdatedActionRecord",
+ "nullable": true
+ },
"key": {
"maxLength": 64,
"minLength": 16,