mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Add missing response code documentation
This commit is contained in:
parent
045ef4b726
commit
c70452b4a4
@ -1764,9 +1764,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
{
|
{
|
||||||
Image = new ItemImageInfo
|
Image = new ItemImageInfo
|
||||||
{
|
{
|
||||||
Path = splashscreenPath,
|
Path = splashscreenPath
|
||||||
Height = 1080,
|
|
||||||
Width = 1920
|
|
||||||
},
|
},
|
||||||
Height = height,
|
Height = height,
|
||||||
MaxHeight = maxHeight,
|
MaxHeight = maxHeight,
|
||||||
@ -1791,11 +1789,15 @@ namespace Jellyfin.Api.Controllers
|
|||||||
/// Uploads a custom splashscreen.
|
/// Uploads a custom splashscreen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
|
/// <response code="204">Sucessfully uploaded new splashscreen.</response>
|
||||||
|
/// <response code="400">Error reading MimeType from uploaded image.</response>
|
||||||
|
/// <response code="403">User does not have permission to upload splashscreen..</response>
|
||||||
/// <exception cref="ArgumentException">Error reading the image format.</exception>
|
/// <exception cref="ArgumentException">Error reading the image format.</exception>
|
||||||
[HttpPost("Branding/Splashscreen")]
|
[HttpPost("Branding/Splashscreen")]
|
||||||
[Authorize(Policy = Policies.RequiresElevation)]
|
[Authorize(Policy = Policies.RequiresElevation)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
[AcceptsImageFile]
|
[AcceptsImageFile]
|
||||||
public async Task<ActionResult> UploadCustomSplashscreen()
|
public async Task<ActionResult> UploadCustomSplashscreen()
|
||||||
{
|
{
|
||||||
@ -1806,7 +1808,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
|
|
||||||
if (mimeType == null)
|
if (mimeType == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Error reading mimetype from uploaded image!");
|
return BadRequest("Error reading mimetype from uploaded image");
|
||||||
}
|
}
|
||||||
|
|
||||||
var filePath = Path.Combine(_appPaths.DataPath, "splashscreen-upload" + MimeTypes.ToExtension(mimeType));
|
var filePath = Path.Combine(_appPaths.DataPath, "splashscreen-upload" + MimeTypes.ToExtension(mimeType));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user