mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 14:13:18 +08:00
29 lines
777 B
C#
29 lines
777 B
C#
|
|
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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|