remove modpack key

This commit is contained in:
2024-07-10 18:45:22 +02:00
parent 1e41fa8b10
commit 60b11d949d
4 changed files with 5 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
using ModpackUpdater.Model;
using Unleash;
using Unleash.ClientFactory;
namespace ModpackUpdater;
@@ -38,7 +39,7 @@ public class ModpackFeatures(ModpackConfig modpackConfig)
InstanceTag = modpackConfig.UnleashInstanceId,
};
api = new DefaultUnleash(settings);
api = new UnleashClientFactory().CreateClient(settings, synchronousInitialization: true);
}
return api != null;
@@ -63,11 +64,10 @@ public abstract class AppFeatureContext
public abstract void Apply(UnleashContext context);
}
public class AllowExtrasFeatureContext(ModpackInfo info, ModpackConfig config) : AppFeatureContext
public class AllowExtrasFeatureContext(ModpackInfo info) : AppFeatureContext
{
public override void Apply(UnleashContext context)
{
context.UserId = info.ExtrasKey;
context.Environment = config.Key;
}
}