Profiles - Added IPluginFeatureDependent interface and implement throughout profiles (#842)

* Profiles - Added IPluginFeatureDependent interface and implement througout profiles
* Workshop - Include dependencies in profile upload request
This commit is contained in:
RobertBeekman authored and GitHub committed 2024-03-03 20:19:36 +01:00
1 parent 28640f9502
commit e5a5f10286
27 files changed
+209 -24

No files matched your search

@@ -4,10 +4,12 @@ namespace Artemis.WebClient.Workshop.Handlers.UploadHandlers;
public class ProfileEntrySource : IEntrySource
{
public ProfileEntrySource(ProfileConfiguration profileConfiguration)
public ProfileEntrySource(ProfileConfiguration profileConfiguration, List<PluginFeature> dependencies)
{
ProfileConfiguration = profileConfiguration;
Dependencies = dependencies;
}
public ProfileConfiguration ProfileConfiguration { get; set; }
public ProfileConfiguration ProfileConfiguration { get; }
public List<PluginFeature> Dependencies { get; }
}
@@ -31,6 +31,7 @@ public class ProfileEntryUploadHandler : IEntryUploadHandler
MultipartFormDataContent content = new();
StreamContent streamContent = new(archiveStream);
streamContent.Headers.ContentType = new MediaTypeHeaderValue("application/zip");
content.Add(JsonContent.Create(source.Dependencies.Select(d => new {PluginId = d.Plugin.Guid, FeatureId = d.Id}).ToList()), "ReleaseDependencies");
content.Add(streamContent, "file", "file.zip");
// Submit