Change API Version from V3 to V1

This commit is contained in:
Qstick 2017-10-30 21:28:29 -04:00
parent db10057f2c
commit aae9f3cfc3
155 changed files with 248 additions and 248 deletions

View file

@ -1,35 +0,0 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NzbDrone.Core.Backup;
using Lidarr.Http;
namespace Lidarr.Api.V3.System.Backup
{
public class BackupModule : LidarrRestModule<BackupResource>
{
private readonly IBackupService _backupService;
public BackupModule(IBackupService backupService) : base("system/backup")
{
_backupService = backupService;
GetResourceAll = GetBackupFiles;
}
public List<BackupResource> GetBackupFiles()
{
var backups = _backupService.GetBackups();
return backups.Select(b => new BackupResource
{
Id = b.Name.GetHashCode(),
Name = b.Name,
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}",
Type = b.Type,
Time = b.Time
})
.OrderByDescending(b => b.Time)
.ToList();
}
}
}