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

@@ -1,5 +1,4 @@
using HermesSocketLibrary.db;
using HermesSocketLibrary.Requests.Messages;
using HermesSocketServer.Models;
using ILogger = Serilog.ILogger;
@@ -18,11 +17,11 @@ 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 temp = new Dictionary<string, object>() { { "user", channel.Id } };
var redemptions = new List<Redemption>();
var redemptions = channel.Redemptions.Get().Values; /* new List<Redemption>();
string sql = $"SELECT id, \"redemptionId\", \"actionName\", \"order\", state FROM \"Redemption\" WHERE \"userId\" = @user";
await _database.Execute(sql, temp, (r) => redemptions.Add(new Redemption()
{
@@ -31,9 +30,9 @@ namespace HermesSocketServer.Requests
ActionName = r.GetString(2),
Order = r.GetInt32(3),
State = r.GetBoolean(4)
}));
}));*/
_logger.Information($"Fetched all redemptions for channel [channel: {channel.Id}]");
return RequestResult.Successful(redemptions, notifyClientsOnAccount: false);
return Task.FromResult(RequestResult.Successful(redemptions, notifyClientsOnAccount: false));
}
}
}