Redid stores. Added user store. Added Channel Manager, to manage data from a single channel.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Text.Json;
|
||||
using HermesSocketLibrary.Requests;
|
||||
using HermesSocketServer.Models;
|
||||
using HermesSocketServer.Store;
|
||||
using ILogger = Serilog.ILogger;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace HermesSocketServer.Requests
|
||||
public class CreateTTSVoice : IRequest
|
||||
{
|
||||
public string Name => "create_tts_voice";
|
||||
private IStore<string, string> _voices;
|
||||
private IStore<string, Voice> _voices;
|
||||
private ILogger _logger;
|
||||
private Random _random;
|
||||
|
||||
@@ -35,7 +36,11 @@ namespace HermesSocketServer.Requests
|
||||
|
||||
string id = RandomString(25);
|
||||
|
||||
_voices.Set(id, data["voice"].ToString());
|
||||
_voices.Set(id, new Voice()
|
||||
{
|
||||
Id = id,
|
||||
Name = data["voice"].ToString()!
|
||||
});
|
||||
_logger.Information($"Added a new voice [voice: {data["voice"]}][voice id: {id}]");
|
||||
|
||||
return new RequestResult(true, id);
|
||||
|
||||
Reference in New Issue
Block a user