mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
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:
1 parent
28640f9502
commit
e5a5f10286
27 files changed
+209
-24
No files matched your search
+4
-2
@@ -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; }
|
||||
}
|
||||
+1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user