mirror of
https://github.com/bitwarden/server.git
synced 2025-04-23 05:55:13 -05:00
make new message for unblock
This commit is contained in:
parent
a67e9a56d9
commit
2bdcff56b6
@ -24,12 +24,13 @@ namespace Bit.Core.Services
|
|||||||
public async Task BlockIpAsync(string ipAddress, bool permanentBlock)
|
public async Task BlockIpAsync(string ipAddress, bool permanentBlock)
|
||||||
{
|
{
|
||||||
await InitAsync();
|
await InitAsync();
|
||||||
var message = new CloudQueueMessage(ipAddress);
|
var blockMessage = new CloudQueueMessage(ipAddress);
|
||||||
await _blockIpQueue.AddMessageAsync(message);
|
await _blockIpQueue.AddMessageAsync(blockMessage);
|
||||||
|
|
||||||
if(!permanentBlock)
|
if(!permanentBlock)
|
||||||
{
|
{
|
||||||
await _unblockIpQueue.AddMessageAsync(message, null, new TimeSpan(0, 15, 0), null, null);
|
var unblockMessage = new CloudQueueMessage(ipAddress);
|
||||||
|
await _unblockIpQueue.AddMessageAsync(unblockMessage, null, new TimeSpan(0, 15, 0), null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user