Iceshrimp.NET/Iceshrimp.Backend/Controllers/FallbackController.cs
2024-07-04 17:53:11 +02:00

21 lines
No EOL
666 B
C#

using System.Net;
using System.Net.Mime;
using Iceshrimp.Backend.Core.Middleware;
using Iceshrimp.Shared.Schemas;
using Iceshrimp.Shared.Schemas.Web;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
namespace Iceshrimp.Backend.Controllers;
[Produces(MediaTypeNames.Application.Json)]
public class FallbackController : ControllerBase
{
[EnableCors("fallback")]
[ProducesResponseType(StatusCodes.Status501NotImplemented, Type = typeof(ErrorResponse))]
public IActionResult FallbackAction()
{
throw new GracefulException(HttpStatusCode.NotImplemented,
"This API method has not been implemented", Request.Path);
}
}