Fixed compiler warnings.

This commit is contained in:
Tom
2024-12-28 17:24:02 +00:00
parent 525725a7e5
commit 538bf07454
30 changed files with 108 additions and 105 deletions

View File

@@ -14,7 +14,7 @@ namespace HermesSocketServer.Requests
_logger = logger;
}
public async Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
public Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
{
var id = Guid.Parse(data["id"].ToString()!);
string groupId = data["groupId"].ToString()!;
@@ -36,9 +36,9 @@ namespace HermesSocketServer.Requests
{
var policy = channel.Policies.Get(id.ToString());
_logger.Information($"Updated policy to channel [policy id: {id}][group id: {groupId}][path: {path}][count: {count}][span: {span}][channel: {channel.Id}]");
return RequestResult.Successful(policy);
return Task.FromResult(RequestResult.Successful(policy));
}
return RequestResult.Failed("Something went wrong when updating the cache.");
return Task.FromResult(RequestResult.Failed("Something went wrong when updating the cache."));
}
}
}