diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-02-04 17:56:12 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-02-04 20:11:08 +0100 |
| commit | 52230d1c30b76f34132c8c3ad21a09deea72d9d8 (patch) | |
| tree | d42c6cbb0ba99e2d6b4414b4aee4d454c5699d9f /Jellyfin.Api/Models/UserDtos/CreateUserByName.cs | |
| parent | 6bf34f8e22c6f72bde15cbb4b500fc6c4f3273b3 (diff) | |
Return NotFound when itemId isn't found
Diffstat (limited to 'Jellyfin.Api/Models/UserDtos/CreateUserByName.cs')
| -rw-r--r-- | Jellyfin.Api/Models/UserDtos/CreateUserByName.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs b/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs index 0503c5d57..6b6d9682b 100644 --- a/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs +++ b/Jellyfin.Api/Models/UserDtos/CreateUserByName.cs @@ -1,4 +1,6 @@ -namespace Jellyfin.Api.Models.UserDtos; +using System.ComponentModel.DataAnnotations; + +namespace Jellyfin.Api.Models.UserDtos; /// <summary> /// The create user by name request body. @@ -8,7 +10,8 @@ public class CreateUserByName /// <summary> /// Gets or sets the username. /// </summary> - public string? Name { get; set; } + [Required] + required public string Name { get; set; } /// <summary> /// Gets or sets the password. |
