mirror of
https://github.com/bitwarden/server.git
synced 2025-02-02 23:41:21 +01:00
remove debug logging
This commit is contained in:
parent
4ed309ea13
commit
bfdc4feaba
@ -148,9 +148,7 @@ namespace Bit.Core.Services
|
|||||||
Payload = payload
|
Payload = payload
|
||||||
};
|
};
|
||||||
|
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay SendPayloadToUserAsync 1");
|
|
||||||
await AddCurrentContextAsync(request, excludeCurrentContext);
|
await AddCurrentContextAsync(request, excludeCurrentContext);
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay SendPayloadToUserAsync 2");
|
|
||||||
await SendAsync(HttpMethod.Post, "push/send", request);
|
await SendAsync(HttpMethod.Post, "push/send", request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,26 +167,20 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
private async Task AddCurrentContextAsync(PushSendRequestModel request, bool addIdentifier)
|
private async Task AddCurrentContextAsync(PushSendRequestModel request, bool addIdentifier)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay AddCurrentContextAsync 0");
|
|
||||||
var currentContext = _httpContextAccessor?.HttpContext?.
|
var currentContext = _httpContextAccessor?.HttpContext?.
|
||||||
RequestServices.GetService(typeof(CurrentContext)) as CurrentContext;
|
RequestServices.GetService(typeof(CurrentContext)) as CurrentContext;
|
||||||
if(!string.IsNullOrWhiteSpace(currentContext?.DeviceIdentifier))
|
if(!string.IsNullOrWhiteSpace(currentContext?.DeviceIdentifier))
|
||||||
{
|
{
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay AddCurrentContextAsync 1");
|
|
||||||
var device = await _deviceRepository.GetByIdentifierAsync(currentContext.DeviceIdentifier);
|
var device = await _deviceRepository.GetByIdentifierAsync(currentContext.DeviceIdentifier);
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay AddCurrentContextAsync 2");
|
|
||||||
if(device != null)
|
if(device != null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay AddCurrentContextAsync 3");
|
|
||||||
request.DeviceId = device.Id.ToString();
|
request.DeviceId = device.Id.ToString();
|
||||||
}
|
}
|
||||||
if(addIdentifier)
|
if(addIdentifier)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay AddCurrentContextAsync 4");
|
|
||||||
request.Identifier = currentContext.DeviceIdentifier;
|
request.Identifier = currentContext.DeviceIdentifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_logger.LogInformation(Constants.BypassFiltersEventId, "Relay AddCurrentContextAsync 5");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier,
|
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier,
|
||||||
|
Loading…
Reference in New Issue
Block a user