mirror of
https://github.com/bitwarden/server
synced 2025-12-21 02:33:30 +00:00
process messages with IEvent
This commit is contained in:
@@ -29,16 +29,16 @@ namespace Bit.Core.Services
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
public async Task CreateAsync(EventTableEntity entity)
|
||||
public async Task CreateAsync(IEvent e)
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(entity, _jsonSettings);
|
||||
var json = JsonConvert.SerializeObject(e, _jsonSettings);
|
||||
var message = new CloudQueueMessage(json);
|
||||
await _queue.AddMessageAsync(message);
|
||||
}
|
||||
|
||||
public async Task CreateManyAsync(IList<EventTableEntity> entities)
|
||||
public async Task CreateManyAsync(IList<IEvent> e)
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(entities, _jsonSettings);
|
||||
var json = JsonConvert.SerializeObject(e, _jsonSettings);
|
||||
var message = new CloudQueueMessage(json);
|
||||
await _queue.AddMessageAsync(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user