mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-26 22:46:53 -04:00
New: v4 API (DROP v3 AFTER TESTING PERIOD)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NzbDrone.Core.DiskSpace;
|
||||
using Radarr.Http;
|
||||
|
||||
namespace Radarr.Api.V4.DiskSpace
|
||||
{
|
||||
[V4ApiController("diskspace")]
|
||||
public class DiskSpaceController : Controller
|
||||
{
|
||||
private readonly IDiskSpaceService _diskSpaceService;
|
||||
|
||||
public DiskSpaceController(IDiskSpaceService diskSpaceService)
|
||||
{
|
||||
_diskSpaceService = diskSpaceService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<DiskSpaceResource> GetFreeSpace()
|
||||
{
|
||||
return _diskSpaceService.GetFreeSpace().ConvertAll(DiskSpaceResourceMapper.MapToResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user