mirror of
https://github.com/bitwarden/server.git
synced 2025-04-08 22:58:11 -05:00
collect events in bulk
This commit is contained in:
parent
db41a1bd13
commit
f9a43288a9
@ -30,20 +30,7 @@ namespace Bit.Events.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> Post([FromBody]EventModel model)
|
public async Task<IActionResult> Post([FromBody]IEnumerable<EventModel> model)
|
||||||
{
|
|
||||||
if(await LogEventAsync(model))
|
|
||||||
{
|
|
||||||
return new OkResult();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new BadRequestResult();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost("many")]
|
|
||||||
public async Task<IActionResult> PostMany([FromBody]IEnumerable<EventModel> model)
|
|
||||||
{
|
{
|
||||||
if(model == null || !model.Any())
|
if(model == null || !model.Any())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user