aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Models/UserDtos/CreateUserByName.cs')
-rw-r--r--Jellyfin.Api/Models/UserDtos/CreateUserByName.cs28
1 files changed, 15 insertions, 13 deletions
diff --git a/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs b/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs
index 1c88d3628..4f9fc4e78 100644
--- a/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs
+++ b/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs
@@ -1,18 +1,20 @@
-namespace Jellyfin.Api.Models.UserDtos
+using System.ComponentModel.DataAnnotations;
+
+namespace Jellyfin.Api.Models.UserDtos;
+
+/// <summary>
+/// The create user by name request body.
+/// </summary>
+public class CreateUserByName
{
/// <summary>
- /// The create user by name request body.
+ /// Gets or sets the username.
/// </summary>
- public class CreateUserByName
- {
- /// <summary>
- /// Gets or sets the username.
- /// </summary>
- public string? Name { get; set; }
+ [Required]
+ public required string Name { get; set; }
- /// <summary>
- /// Gets or sets the password.
- /// </summary>
- public string? Password { get; set; }
- }
+ /// <summary>
+ /// Gets or sets the password.
+ /// </summary>
+ public string? Password { get; set; }
}