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:
@ -1,4 +1,6 @@
|
||||
using HermesSocketLibrary.db;
|
||||
using HermesSocketLibrary.Requests.Messages;
|
||||
using HermesSocketServer.Models;
|
||||
using HermesSocketServer.Store;
|
||||
|
||||
namespace HermesSocketServer.Services
|
||||
@ -6,12 +8,12 @@ namespace HermesSocketServer.Services
|
||||
public class DatabaseService : BackgroundService
|
||||
{
|
||||
private readonly ChannelManager _channels;
|
||||
private readonly VoiceStore _voices;
|
||||
private readonly UserStore _users;
|
||||
private readonly IStore<string, TTSVoice> _voices;
|
||||
private readonly IStore<string, User> _users;
|
||||
private readonly ServerConfiguration _configuration;
|
||||
private readonly Serilog.ILogger _logger;
|
||||
|
||||
public DatabaseService(ChannelManager channels, VoiceStore voices, UserStore users, ServerConfiguration configuration, Serilog.ILogger logger)
|
||||
public DatabaseService(ChannelManager channels, IStore<string, TTSVoice> voices, IStore<string, User> users, ServerConfiguration configuration, Serilog.ILogger logger)
|
||||
{
|
||||
_channels = channels;
|
||||
_voices = voices;
|
||||
|
Reference in New Issue
Block a user