Enable nullable reference types on new class, remove unnecessary documenation and return types

pull/2876/head
ZadenRB 5 years ago
parent 16cae23bbe
commit 688240151b

@ -72,7 +72,6 @@ namespace Jellyfin.Api.Controllers
/// <returns>All notification types.</returns> /// <returns>All notification types.</returns>
[HttpGet("Types")] [HttpGet("Types")]
[ProducesResponseType(typeof(IEnumerable<NameIdPair>), StatusCodes.Status200OK)] [ProducesResponseType(typeof(IEnumerable<NameIdPair>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
public IActionResult GetNotificationTypes() public IActionResult GetNotificationTypes()
{ {
try try
@ -91,7 +90,6 @@ namespace Jellyfin.Api.Controllers
/// <returns>All notification services.</returns> /// <returns>All notification services.</returns>
[HttpGet("Services")] [HttpGet("Services")]
[ProducesResponseType(typeof(IEnumerable<NameIdPair>), StatusCodes.Status200OK)] [ProducesResponseType(typeof(IEnumerable<NameIdPair>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
public IActionResult GetNotificationServices() public IActionResult GetNotificationServices()
{ {
try try
@ -114,7 +112,6 @@ namespace Jellyfin.Api.Controllers
/// <returns>Status.</returns> /// <returns>Status.</returns>
[HttpPost("Admin")] [HttpPost("Admin")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(typeof(string), StatusCodes.Status500InternalServerError)]
public IActionResult CreateAdminNotification( public IActionResult CreateAdminNotification(
[FromQuery] string name, [FromQuery] string name,
[FromQuery] string description, [FromQuery] string description,
@ -148,14 +145,12 @@ namespace Jellyfin.Api.Controllers
/// </summary> /// </summary>
/// <param name="userId">The userID.</param> /// <param name="userId">The userID.</param>
/// <param name="ids">A comma-separated list of the IDs of notifications which should be set as read.</param> /// <param name="ids">A comma-separated list of the IDs of notifications which should be set as read.</param>
/// <returns>Status.</returns>
[HttpPost("{UserID}/Read")] [HttpPost("{UserID}/Read")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public IActionResult SetRead( public void SetRead(
[FromRoute] string userId, [FromRoute] string userId,
[FromQuery] string ids) [FromQuery] string ids)
{ {
return Ok();
} }
/// <summary> /// <summary>
@ -163,14 +158,12 @@ namespace Jellyfin.Api.Controllers
/// </summary> /// </summary>
/// <param name="userId">The userID.</param> /// <param name="userId">The userID.</param>
/// <param name="ids">A comma-separated list of the IDs of notifications which should be set as unread.</param> /// <param name="ids">A comma-separated list of the IDs of notifications which should be set as unread.</param>
/// <returns>Status.</returns>
[HttpPost("{UserID}/Unread")] [HttpPost("{UserID}/Unread")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public IActionResult SetUnread( public void SetUnread(
[FromRoute] string userId, [FromRoute] string userId,
[FromQuery] string ids) [FromQuery] string ids)
{ {
return Ok();
} }
} }
} }

@ -1,3 +1,5 @@
#nullable enable
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

Loading…
Cancel
Save