mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 09:03:49 -07:00
New: Update Nancy to 2.0
This commit is contained in:
parent
425bd8964f
commit
17c9fc419c
44 changed files with 266 additions and 266 deletions
|
@ -32,8 +32,8 @@ namespace Lidarr.Api.V1.System.Backup
|
|||
GetResourceAll = GetBackupFiles;
|
||||
DeleteResource = DeleteBackup;
|
||||
|
||||
Post[@"/restore/(?<id>[\d]{1,10})"] = x => Restore((int)x.Id);
|
||||
Post["/restore/upload"] = x => UploadAndRestore();
|
||||
Post(@"/restore/(?<id>[\d]{1,10})", x => Restore((int)x.Id));
|
||||
Post("/restore/upload", x => UploadAndRestore());
|
||||
}
|
||||
|
||||
public List<BackupResource> GetBackupFiles()
|
||||
|
@ -65,7 +65,7 @@ namespace Lidarr.Api.V1.System.Backup
|
|||
_diskProvider.DeleteFile(path);
|
||||
}
|
||||
|
||||
public Response Restore(int id)
|
||||
public object Restore(int id)
|
||||
{
|
||||
var backup = GetBackup(id);
|
||||
|
||||
|
@ -81,10 +81,10 @@ namespace Lidarr.Api.V1.System.Backup
|
|||
return new
|
||||
{
|
||||
RestartRequired = true
|
||||
}.AsResponse();
|
||||
};
|
||||
}
|
||||
|
||||
public Response UploadAndRestore()
|
||||
public object UploadAndRestore()
|
||||
{
|
||||
var files = Context.Request.Files.ToList();
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace Lidarr.Api.V1.System.Backup
|
|||
return new
|
||||
{
|
||||
RestartRequired = true
|
||||
}.AsResponse();
|
||||
};
|
||||
}
|
||||
|
||||
private string GetBackupPath(NzbDrone.Core.Backup.Backup backup)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue