mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
refactor interface name to the naming convention for interfaces
This commit is contained in:
parent
a1da63984b
commit
12409ababb
@ -1,29 +1,23 @@
|
||||
|
||||
using System.CommandLine;
|
||||
using System.CommandLine.Invocation;
|
||||
using System.CommandLine.NamingConventionBinder;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Wabbajack.CLI.Builder;
|
||||
using Wabbajack.DTOs.Logins;
|
||||
using Wabbajack.Paths;
|
||||
using Wabbajack.Paths.IO;
|
||||
using Wabbajack.Services.OSIntegrated;
|
||||
|
||||
namespace Wabbajack.CLI.Verbs;
|
||||
|
||||
public class SetNexusApiKey
|
||||
{
|
||||
private readonly EncryptedJsonTokenProvider<NexusApiState> _tokenProvider;
|
||||
private readonly EncryptedJsonTokenProvider<NexusOAuthState> _tokenProvider;
|
||||
private readonly ILogger<SetNexusApiKey> _logger;
|
||||
|
||||
public SetNexusApiKey(EncryptedJsonTokenProvider<NexusApiState> tokenProvider, ILogger<SetNexusApiKey> logger)
|
||||
public SetNexusApiKey(EncryptedJsonTokenProvider<NexusOAuthState> tokenProvider, ILogger<SetNexusApiKey> logger)
|
||||
{
|
||||
_tokenProvider = tokenProvider;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public static VerbDefinition Definition = new VerbDefinition("set-nexus-api-key",
|
||||
public static VerbDefinition Definition = new("set-nexus-api-key",
|
||||
"Sets the Nexus API key to the specified value",
|
||||
[
|
||||
new OptionDefinition(typeof(string), "k", "key", "The Nexus API key")
|
||||
@ -38,7 +32,7 @@ public class SetNexusApiKey
|
||||
}
|
||||
else
|
||||
{
|
||||
await _tokenProvider.SetToken(new NexusApiState { ApiKey = key });
|
||||
await _tokenProvider.SetToken(new() { ApiKey = key });
|
||||
_logger.LogInformation("Set Nexus API Key to {key}", key);
|
||||
return 0;
|
||||
}
|
||||
|
@ -3,6 +3,6 @@ using Wabbajack.Networking.Http.Interfaces;
|
||||
|
||||
namespace Wabbajack.Networking.NexusApi;
|
||||
|
||||
public interface AuthInfo : ITokenProvider<NexusOAuthState>
|
||||
public interface IAuthInfo : ITokenProvider<NexusOAuthState>
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user