Fixed compiler warnings.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace HermesSocketServer.Requests
|
||||
_random = new Random();
|
||||
}
|
||||
|
||||
public async Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
|
||||
public Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
|
||||
{
|
||||
string voice = data["voice"].ToString()!;
|
||||
string id = RandomString(25);
|
||||
@@ -32,9 +32,9 @@ namespace HermesSocketServer.Requests
|
||||
|
||||
if (result) {
|
||||
_logger.Information($"Added a new voice [voice: {voice}][voice id: {id}]");
|
||||
return RequestResult.Successful(id);
|
||||
return Task.FromResult(RequestResult.Successful(id));
|
||||
}
|
||||
return RequestResult.Failed("Something went wrong when updating the cache.");
|
||||
return Task.FromResult(RequestResult.Failed("Something went wrong when updating the cache."));
|
||||
}
|
||||
|
||||
private string RandomString(int length)
|
||||
|
||||
Reference in New Issue
Block a user