1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

organize event models. stub out event services

This commit is contained in:
Kyle Spearrin
2017-12-01 09:22:04 -05:00
parent ba9cca057e
commit f4586002c4
14 changed files with 194 additions and 91 deletions

View File

@ -0,0 +1,28 @@
using System.Threading.Tasks;
using System;
using Bit.Core.Enums;
using Bit.Core.Repositories;
using Bit.Core.Models.Data;
namespace Bit.Core.Services
{
public class EventService : IEventService
{
private readonly IEventRepository _eventRepository;
private readonly GlobalSettings _globalSettings;
public EventService(
IEventRepository eventRepository,
GlobalSettings globalSettings)
{
_eventRepository = eventRepository;
_globalSettings = globalSettings;
}
public async Task LogUserEventAsync(Guid userId, EventType type)
{
var userEvent = new UserEvent(userId, type);
await _eventRepository.CreateAsync(userEvent);
}
}
}