aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-09 12:41:23 -0500
committerJP Dillingham <jp@dillingham.me>2026-05-09 12:41:23 -0500
commitb3041a9daffa98a0acda701e5e6b26345a185bde (patch)
treed2603abbd8675dc6ad81d6675a6d6ab65b5d4d7f /src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
parentf70c670e1dfbc6e6642365f57ba138501a8826fa (diff)
downloadslskd-b3041a9daffa98a0acda701e5e6b26345a185bde.tar.gz
add validation and tests for batch request DTO
Diffstat (limited to 'src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs')
-rw-r--r--src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
index 4a1d32f1..6d08f8f3 100644
--- a/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
+++ b/src/slskd/Transfers/API/DTO/QueueDownloadBatchRequest.cs
@@ -45,12 +45,14 @@ public record QueueDownloadBatchRequest
/// <remarks>
/// If not supplied, one will be randomly generated.
/// </remarks>
- public Guid? Id { get; init; } = Guid.NewGuid();
+ [Guid]
+ public string Id { get; init; }
/// <summary>
/// The ID of the associated Search, if applicable.
/// </summary>
- public Guid? SearchId { get; init; }
+ [Guid]
+ public string SearchId { get; init; }
/// <summary>
/// The username of the user from which to download.
@@ -76,6 +78,7 @@ public record EnqueueDownloadBatchItem
/// The name of the file.
/// </summary>
[Required]
+ [StringLength(int.MaxValue, MinimumLength = 1)]
public string Filename { get; set; }
/// <summary>