mirror of
https://github.com/bitwarden/server
synced 2026-01-05 18:13:31 +00:00
use EventTableEntity instead of TableEntity
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Models.Data;
|
||||
using Microsoft.WindowsAzure.Storage.Table;
|
||||
|
||||
namespace Bit.Core.Repositories
|
||||
{
|
||||
public interface IEventRepository
|
||||
{
|
||||
Task<ICollection<EventTableEntity>> GetManyByUserAsync(Guid userId, DateTime startDate, DateTime endDate);
|
||||
Task CreateAsync(ITableEntity entity);
|
||||
Task CreateManyAsync(IList<ITableEntity> entities);
|
||||
Task CreateAsync(EventTableEntity entity);
|
||||
Task CreateManyAsync(IList<EventTableEntity> entities);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ namespace Bit.Core.Repositories.TableStorage
|
||||
return results;
|
||||
}
|
||||
|
||||
public async Task CreateAsync(ITableEntity entity)
|
||||
public async Task CreateAsync(EventTableEntity entity)
|
||||
{
|
||||
await Table.ExecuteAsync(TableOperation.Insert(entity));
|
||||
}
|
||||
|
||||
public async Task CreateManyAsync(IList<ITableEntity> entities)
|
||||
public async Task CreateManyAsync(IList<EventTableEntity> entities)
|
||||
{
|
||||
if(!entities?.Any() ?? true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user