diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-06-15 10:51:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-15 10:51:28 +0900 |
| commit | e2b2f74b47cc1d281c0819795b83f8d49d1f3b09 (patch) | |
| tree | cc092ac87ee82d94305ce507addd3a355b79e910 /Jellyfin.Api/Controllers/NotificationsController.cs | |
| parent | 293187480fb4b7bb74af80dcb8ffa1b5ccef0816 (diff) | |
| parent | 9bedd9ac3ca5b5854acd6891e746bf2e7225ff21 (diff) | |
Merge pull request #3319 from Ullmie02/api-204
Use Http status code 204 instead of 200
Diffstat (limited to 'Jellyfin.Api/Controllers/NotificationsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/NotificationsController.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Jellyfin.Api/Controllers/NotificationsController.cs b/Jellyfin.Api/Controllers/NotificationsController.cs index 8d82ca10f..5af194756 100644 --- a/Jellyfin.Api/Controllers/NotificationsController.cs +++ b/Jellyfin.Api/Controllers/NotificationsController.cs @@ -99,10 +99,10 @@ namespace Jellyfin.Api.Controllers /// <param name="description">The description of the notification.</param> /// <param name="url">The URL of the notification.</param> /// <param name="level">The level of the notification.</param> - /// <response code="200">Notification sent.</response> - /// <returns>An <cref see="OkResult"/>.</returns> + /// <response code="204">Notification sent.</response> + /// <returns>A <cref see="NoContentResult"/>.</returns> [HttpPost("Admin")] - [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult CreateAdminNotification( [FromQuery] string name, [FromQuery] string description, @@ -121,7 +121,7 @@ namespace Jellyfin.Api.Controllers _notificationManager.SendNotification(notification, CancellationToken.None); - return Ok(); + return NoContent(); } /// <summary> @@ -129,15 +129,15 @@ namespace Jellyfin.Api.Controllers /// </summary> /// <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> - /// <response code="200">Notifications set as read.</response> - /// <returns>An <cref see="OkResult"/>.</returns> + /// <response code="204">Notifications set as read.</response> + /// <returns>A <cref see="NoContentResult"/>.</returns> [HttpPost("{UserID}/Read")] - [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SetRead( [FromRoute] string userId, [FromQuery] string ids) { - return Ok(); + return NoContent(); } /// <summary> @@ -145,15 +145,15 @@ namespace Jellyfin.Api.Controllers /// </summary> /// <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> - /// <response code="200">Notifications set as unread.</response> - /// <returns>An <cref see="OkResult"/>.</returns> + /// <response code="204">Notifications set as unread.</response> + /// <returns>A <cref see="NoContentResult"/>.</returns> [HttpPost("{UserID}/Unread")] - [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status204NoContent)] public ActionResult SetUnread( [FromRoute] string userId, [FromQuery] string ids) { - return Ok(); + return NoContent(); } } } |
