mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Make all optional strings nullable
This commit is contained in:
@@ -164,8 +164,8 @@ namespace Jellyfin.Api.Controllers
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<ActionResult<AuthenticationResult>> AuthenticateUser(
|
||||
[FromRoute, Required] Guid userId,
|
||||
[FromQuery, BindRequired] string pw,
|
||||
[FromQuery, BindRequired] string password)
|
||||
[FromQuery, BindRequired] string? pw,
|
||||
[FromQuery, BindRequired] string? password)
|
||||
{
|
||||
var user = _userManager.GetUserById(userId);
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace Jellyfin.Api.Controllers
|
||||
/// <returns>A <see cref="Task"/> containing a <see cref="ForgotPasswordResult"/>.</returns>
|
||||
[HttpPost("ForgotPassword")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
public async Task<ActionResult<ForgotPasswordResult>> ForgotPassword([FromBody] string enteredUsername)
|
||||
public async Task<ActionResult<ForgotPasswordResult>> ForgotPassword([FromBody] string? enteredUsername)
|
||||
{
|
||||
var isLocal = HttpContext.Connection.RemoteIpAddress.Equals(HttpContext.Connection.LocalIpAddress)
|
||||
|| _networkManager.IsInLocalNetwork(HttpContext.Connection.RemoteIpAddress.ToString());
|
||||
@@ -501,7 +501,7 @@ namespace Jellyfin.Api.Controllers
|
||||
/// <returns>A <see cref="Task"/> containing a <see cref="PinRedeemResult"/>.</returns>
|
||||
[HttpPost("ForgotPassword/Pin")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
public async Task<ActionResult<PinRedeemResult>> ForgotPasswordPin([FromBody] string pin)
|
||||
public async Task<ActionResult<PinRedeemResult>> ForgotPasswordPin([FromBody] string? pin)
|
||||
{
|
||||
var result = await _userManager.RedeemPasswordResetPin(pin).ConfigureAwait(false);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user