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,5 +1,3 @@
using HermesSocketLibrary.db;
using HermesSocketLibrary.Requests;
using HermesSocketLibrary.Requests.Messages;
using HermesSocketServer.Store;
using ILogger = Serilog.ILogger;
@@ -9,6 +7,7 @@ namespace HermesSocketServer.Requests
public class GetTTSVoices : IRequest
{
public string Name => "get_tts_voices";
public string[] RequiredKeys => [];
private VoiceStore _voices;
private ILogger _logger;
@@ -27,7 +26,7 @@ namespace HermesSocketServer.Requests
});
_logger.Information($"Fetched all TTS voices for channel [channel: {sender}]");
return new RequestResult(true, voices, notifyClientsOnAccount: false);
return RequestResult.Successful(voices, notifyClientsOnAccount: false);
}
}
}