diff --git a/Wabbajack.Lib/ACompiler.cs b/Wabbajack.Lib/ACompiler.cs index 87e6501e..c34e179f 100644 --- a/Wabbajack.Lib/ACompiler.cs +++ b/Wabbajack.Lib/ACompiler.cs @@ -183,7 +183,7 @@ namespace Wabbajack.Lib if (PublishData == null) return; var ourLists = await (await AuthorApi.Client.Create()).GetMyModlists(); - if (ourLists.All(l => l.MachineURL != PublishData.MachineUrl)) + if (ourLists.All(l => l != PublishData.MachineUrl)) { Utils.ErrorThrow(new CriticalFailureIntervention( $"Cannot publish to {PublishData.MachineUrl}, you are not listed as a maintainer", diff --git a/Wabbajack.Lib/AuthorApi/Client.cs b/Wabbajack.Lib/AuthorApi/Client.cs index ed081c38..6f5d3367 100644 --- a/Wabbajack.Lib/AuthorApi/Client.cs +++ b/Wabbajack.Lib/AuthorApi/Client.cs @@ -88,22 +88,10 @@ namespace Wabbajack.Lib.AuthorApi }); } - public async Task> GetMyModlists() + public async Task> GetMyModlists() { var myLists = await _client.GetJsonAsync($"{Consts.WabbajackBuildServerUri}author_controls/lists"); - List<(string MachineURL, Version Version)> lists = new(); - var client = await GitHub.Client.Get(); - foreach (var file in Enum.GetValues()) - { - foreach (var lst in (await client.GetData(file)).Lists) - { - if (myLists.Contains(lst.Links.MachineURL)) - { - lists.Add((lst.Links.MachineURL, lst.Version ?? new Version())); - } - } - } - return lists; + return myLists; } public async Task UploadFile(WorkQueue queue, AbsolutePath path, Action progressFn)