|
|
@ -22,7 +22,6 @@ namespace NzbDrone.Api.Update
|
|
|
|
_recentUpdateProvider = recentUpdateProvider;
|
|
|
|
_recentUpdateProvider = recentUpdateProvider;
|
|
|
|
_installUpdateService = installUpdateService;
|
|
|
|
_installUpdateService = installUpdateService;
|
|
|
|
GetResourceAll = GetRecentUpdates;
|
|
|
|
GetResourceAll = GetRecentUpdates;
|
|
|
|
Post["/"] = x=> InstallUpdate();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<UpdateResource> GetRecentUpdates()
|
|
|
|
private List<UpdateResource> GetRecentUpdates()
|
|
|
@ -46,16 +45,6 @@ namespace NzbDrone.Api.Update
|
|
|
|
|
|
|
|
|
|
|
|
return resources;
|
|
|
|
return resources;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Response InstallUpdate()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var updateResource = Request.Body.FromJson<UpdateResource>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var updatePackage = updateResource.InjectTo<UpdatePackage>();
|
|
|
|
|
|
|
|
_installUpdateService.InstallUpdate(updatePackage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return updateResource.AsResponse();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class UpdateResource : RestResource
|
|
|
|
public class UpdateResource : RestResource
|
|
|
|