Fixed issues with creating/deleting connection messages.
This commit is contained in:
@ -7,7 +7,7 @@ namespace HermesSocketServer.Requests
|
||||
public class CreateConnection : IRequest
|
||||
{
|
||||
public string Name => "create_connection";
|
||||
public string[] RequiredKeys => ["name", "type", "clientId", "accessToken", "grantType", "scope", "expiration"];
|
||||
public string[] RequiredKeys => ["name", "type", "client_id", "access_token", "grant_type", "scope", "expiration"];
|
||||
private ILogger _logger;
|
||||
|
||||
public CreateConnection(ILogger logger)
|
||||
@ -19,9 +19,9 @@ namespace HermesSocketServer.Requests
|
||||
{
|
||||
string name = data["name"].ToString()!;
|
||||
string type = data["type"].ToString()!;
|
||||
string clientId = data["clientId"].ToString()!;
|
||||
string accessToken = data["accessToken"].ToString()!;
|
||||
string grantType = data["grantType"].ToString()!;
|
||||
string clientId = data["client_id"].ToString()!;
|
||||
string accessToken = data["access_token"].ToString()!;
|
||||
string grantType = data["grant_type"].ToString()!;
|
||||
string scope = data["scope"].ToString()!;
|
||||
if (!DateTime.TryParse(data["expiration"].ToString()!, out var expiresAt))
|
||||
return Task.FromResult(RequestResult.Failed("Expiration needs to be a date time string."));
|
||||
|
Reference in New Issue
Block a user