[backend/api] Add [Consumes] Attribute to the UpdateFile endpoint

This commit is contained in:
Laura Hausmann 2024-04-22 19:32:58 +02:00
parent 86cc2986c3
commit 675ec23a3c
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Net.Mime;
using Iceshrimp.Backend.Core.Configuration; using Iceshrimp.Backend.Core.Configuration;
using Iceshrimp.Backend.Core.Database; using Iceshrimp.Backend.Core.Database;
using Iceshrimp.Backend.Core.Middleware; using Iceshrimp.Backend.Core.Middleware;
@ -117,6 +118,7 @@ public class DriveController(
[HttpPatch("{id}")] [HttpPatch("{id}")]
[Authenticate] [Authenticate]
[Authorize] [Authorize]
[Consumes(MediaTypeNames.Application.Json)]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(DriveFileResponse))] [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(DriveFileResponse))]
[ProducesResponseType(StatusCodes.Status404NotFound, Type = typeof(ErrorResponse))] [ProducesResponseType(StatusCodes.Status404NotFound, Type = typeof(ErrorResponse))]
public async Task<IActionResult> UpdateFile(string id, UpdateDriveFileRequest request) public async Task<IActionResult> UpdateFile(string id, UpdateDriveFileRequest request)