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

@ -16,7 +16,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 = data["id"].ToString()!;
string search = data["search"].ToString()!;
@ -35,9 +35,9 @@ namespace HermesSocketServer.Requests
if (result)
{
_logger.Information($"Updated filter to channel [filter id: {id}][search: {search}][replace: {replace}][channel: {channel.Id}]");
return RequestResult.Successful(filter);
return Task.FromResult(RequestResult.Successful(filter));
}
return RequestResult.Failed("Something went wrong when updating the cache.");
return Task.FromResult(RequestResult.Failed("Something went wrong when updating the cache."));
}
}
}