25 lines
719 B
C#
25 lines
719 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Tiku.Api.Controllers;
|
|
|
|
[ApiController]
|
|
[AllowAnonymous]
|
|
[ApiExplorerSettings(IgnoreApi = true)]
|
|
[Route("api/public/catalog")]
|
|
public sealed class RetiredPublicCatalogController : ControllerBase
|
|
{
|
|
[AcceptVerbs("GET", "HEAD")]
|
|
[Route("{**path}")]
|
|
public IActionResult Retired()
|
|
{
|
|
return StatusCode(StatusCodes.Status410Gone, new ProblemDetails
|
|
{
|
|
Title = "Public catalog is retired.",
|
|
Detail = "Authenticate and use /api/student/catalog instead.",
|
|
Status = StatusCodes.Status410Gone,
|
|
Extensions = { ["code"] = "public_catalog_retired" }
|
|
});
|
|
}
|
|
}
|