mirror of
https://github.com/bitwarden/server
synced 2025-12-17 08:43:27 +00:00
Remove GetManyDetailsByUserAsync & ReplaceAsync DB Calls (#6012)
This commit is contained in:
@@ -29,9 +29,17 @@ public class DeviceService : IDeviceService
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
public async Task SaveAsync(WebPushRegistrationData webPush, Device device)
|
||||
public async Task SaveAsync(WebPushRegistrationData webPush, Device device, IEnumerable<string> organizationIds)
|
||||
{
|
||||
await SaveAsync(new PushRegistrationData(webPush.Endpoint, webPush.P256dh, webPush.Auth), device);
|
||||
await _pushRegistrationService.CreateOrUpdateRegistrationAsync(
|
||||
new PushRegistrationData(webPush.Endpoint, webPush.P256dh, webPush.Auth),
|
||||
device.Id.ToString(),
|
||||
device.UserId.ToString(),
|
||||
device.Identifier,
|
||||
device.Type,
|
||||
organizationIds,
|
||||
_globalSettings.Installation.Id
|
||||
);
|
||||
}
|
||||
|
||||
public async Task SaveAsync(Device device)
|
||||
|
||||
Reference in New Issue
Block a user