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:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user