Merge pull request #457 from Bishbash777/master

Phase 1 migration
This commit is contained in:
Bishbash777
2022-01-14 03:03:37 +00:00
committed by GitHub

View File

@@ -12,8 +12,8 @@ namespace Torch.API.WebAPI
{ {
public class PluginQuery public class PluginQuery
{ {
private const string ALL_QUERY = "https://torchapi.net/api/plugins"; private const string ALL_QUERY = "https://torchapi.com/api/plugins";
private const string PLUGIN_QUERY = "https://torchapi.net/api/plugins/{0}"; private const string PLUGIN_QUERY = "https://torchapi.com/api/plugins/item/{0}";
private readonly HttpClient _client; private readonly HttpClient _client;
private static readonly Logger Log = LogManager.GetCurrentClassLogger(); private static readonly Logger Log = LogManager.GetCurrentClassLogger();
@@ -87,6 +87,7 @@ namespace Torch.API.WebAPI
public async Task<bool> DownloadPlugin(string guid, string path = null) public async Task<bool> DownloadPlugin(string guid, string path = null)
{ {
var item = await QueryOne(guid); var item = await QueryOne(guid);
if (item == null) return false;
return await DownloadPlugin(item, path); return await DownloadPlugin(item, path);
} }