Added database table data into configuration. Store saves is auto-handled. Added Action & Redemption stores.

This commit is contained in:
Tom
2024-12-31 18:31:21 +00:00
parent 538bf07454
commit 3429c8f8dc
29 changed files with 657 additions and 374 deletions

View File

@@ -1,3 +1,4 @@
using HermesSocketLibrary.Requests.Messages;
using HermesSocketServer.Models;
using HermesSocketServer.Store;
using ILogger = Serilog.ILogger;
@@ -8,7 +9,7 @@ namespace HermesSocketServer.Requests
{
public string Name => "update_tts_voice";
public string[] RequiredKeys => ["voice", "voiceId"];
private IStore<string, Voice> _voices;
private IStore<string, TTSVoice> _voices;
private ILogger _logger;
public UpdateTTSVoice(VoiceStore voices, ILogger logger)
@@ -22,7 +23,7 @@ namespace HermesSocketServer.Requests
string voiceName = data["voice"].ToString()!;
string voiceId = data["voiceid"].ToString()!;
var result = _voices.Set(voiceId, new Voice()
var result = _voices.Set(voiceId, new TTSVoice()
{
Id = voiceId,
Name = voiceName