Moved Requests classes to here. Added some checks to requests.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using HermesSocketLibrary.db;
|
||||
using HermesSocketLibrary.Requests;
|
||||
using ILogger = Serilog.ILogger;
|
||||
|
||||
namespace HermesSocketServer.Requests
|
||||
@@ -7,6 +6,7 @@ namespace HermesSocketServer.Requests
|
||||
public class GetChatterIds : IRequest
|
||||
{
|
||||
public string Name => "get_chatter_ids";
|
||||
public string[] RequiredKeys => [];
|
||||
private Database _database;
|
||||
private ILogger _logger;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace HermesSocketServer.Requests
|
||||
string sql = $"SELECT id FROM \"Chatter\"";
|
||||
await _database.Execute(sql, (IDictionary<string, object>?) null, (r) => ids.Add(r.GetInt64(0)));
|
||||
_logger.Information($"Fetched all chatters for channel [channel: {sender}]");
|
||||
return new RequestResult(true, ids, notifyClientsOnAccount: false);
|
||||
return RequestResult.Successful(ids, notifyClientsOnAccount: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user