- Add Health, Video, and Download controllers with endpoints for health checks, video details, processing, status, results, and simulated downloads - Implement IVideoService for YouTube URL validation and mock video info - Add API models for responses and job status tracking - Configure DI, CORS (BlazorPolicy), OpenAPI, and root metadata endpoint in Program.cs - Add README with usage, troubleshooting, and development notes - Minor project file cleanup and encoding fix
29 lines
689 B
C#
29 lines
689 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace TuneRipper.Api.Controllers;
|
|
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class HealthController : ControllerBase
|
|
{
|
|
[HttpGet]
|
|
public IActionResult Get()
|
|
{
|
|
var response = new
|
|
{
|
|
status = "healthy",
|
|
timestamp = DateTime.UtcNow,
|
|
version = "1.0.0",
|
|
service = "TuneRipper.Api",
|
|
environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"
|
|
};
|
|
|
|
return Ok(response);
|
|
}
|
|
|
|
[HttpGet("ping")]
|
|
public IActionResult Ping()
|
|
{
|
|
return Ok(new { message = "pong", timestamp = DateTime.UtcNow });
|
|
}
|
|
} |