Changed the default way to modify values in store. Added basic validation to stores. Using interfaces to DI store objects.

This commit is contained in:
Tom
2025-01-16 19:49:02 +00:00
parent b00c72ec2a
commit ee3f128a9f
24 changed files with 173 additions and 61 deletions

View File

@@ -17,6 +17,8 @@ using HermesSocketServer.Store;
using HermesSocketServer.Services;
using HermesSocketServer.Store.Internal;
using Microsoft.Extensions.DependencyInjection;
using HermesSocketLibrary.Requests.Messages;
using HermesSocketServer.Models;
var yamlDeserializer = new DeserializerBuilder()
@@ -88,8 +90,8 @@ if (configuration.Database.Tables != null)
}
// Stores
s.AddSingleton<VoiceStore>();
s.AddSingleton<UserStore>();
s.AddSingleton<IStore<string, TTSVoice>, VoiceStore>();
s.AddSingleton<IStore<string, User>, UserStore>();
// Request handlers
s.AddSingleton<IRequest, CreatePolicy>();