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 | |
| parent | 6bf34f8e22c6f72bde15cbb4b500fc6c4f3273b3 (diff) | |
Return NotFound when itemId isn't found
Diffstat (limited to 'Jellyfin.Api/Models')
| -rw-r--r-- | Jellyfin.Api/Models/UserDtos/CreateUserByName.cs | 7 | ||||
| -rw-r--r-- | Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs | 2 |
3 files changed, 7 insertions, 4 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. diff --git a/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs b/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs index ebe9297ea..a0631fd07 100644 --- a/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs +++ b/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs @@ -11,5 +11,5 @@ public class ForgotPasswordDto /// Gets or sets the entered username to have its password reset. /// </summary> [Required] - public string? EnteredUsername { get; set; } + required public string EnteredUsername { get; set; } } diff --git a/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs b/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs index 2949efe29..79b8a5d63 100644 --- a/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs +++ b/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs @@ -11,5 +11,5 @@ public class ForgotPasswordPinDto /// Gets or sets the entered pin to have the password reset. /// </summary> [Required] - public string? Pin { get; set; } + required public string Pin { get; set; } } |
