Moved Requests classes to here. Added some checks to requests.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System.Text.Json;
|
||||
using HermesSocketLibrary.db;
|
||||
using HermesSocketLibrary.Requests;
|
||||
using HermesSocketLibrary.Requests.Messages;
|
||||
using ILogger = Serilog.ILogger;
|
||||
|
||||
@@ -9,6 +7,7 @@ namespace HermesSocketServer.Requests
|
||||
public class GetEmotes : IRequest
|
||||
{
|
||||
public string Name => "get_emotes";
|
||||
public string[] RequiredKeys => [];
|
||||
private Database _database;
|
||||
private ILogger _logger;
|
||||
|
||||
@@ -28,7 +27,7 @@ namespace HermesSocketServer.Requests
|
||||
Name = r.GetString(1)
|
||||
}));
|
||||
_logger.Information($"Fetched all emotes for channel [channel: {sender}]");
|
||||
return new RequestResult(true, emotes, notifyClientsOnAccount: false);
|
||||
return RequestResult.Successful(emotes, notifyClientsOnAccount: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user