Moved Requests classes to here. Added some checks to requests.

This commit is contained in:
Tom
2024-10-20 20:39:13 +00:00
parent a9cdb65895
commit e3c78d96fa
23 changed files with 186 additions and 150 deletions

View File

@@ -1,6 +1,4 @@
using System.Text.RegularExpressions;
using HermesSocketLibrary.db;
using HermesSocketLibrary.Requests;
using HermesSocketLibrary.Requests.Messages;
using ILogger = Serilog.ILogger;
@@ -9,6 +7,7 @@ namespace HermesSocketServer.Requests
public class GetTTSWordFilters : IRequest
{
public string Name => "get_tts_word_filters";
public string[] RequiredKeys => [];
private readonly Database _database;
private readonly ILogger _logger;
@@ -31,7 +30,7 @@ namespace HermesSocketServer.Requests
Replace = r.GetString(2)
}));
_logger.Information($"Fetched all word filters for channel [channel: {sender}]");
return new RequestResult(true, filters, notifyClientsOnAccount: false);
return RequestResult.Successful(filters, notifyClientsOnAccount: false);
}
}
}