mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
Cleanup
This commit is contained in:
@@ -12,7 +12,7 @@ services:
|
||||
- mssql_dev_data:/var/opt/mssql
|
||||
- ../util/Migrator:/mnt/migrator/
|
||||
- ./helpers/mssql:/mnt/helpers
|
||||
- mssql_data:/mssql:/mnt/data
|
||||
- ./.data/mssql:/mnt/data
|
||||
ports:
|
||||
- "1433:1433"
|
||||
profiles:
|
||||
@@ -26,7 +26,7 @@ services:
|
||||
- "10001:10001"
|
||||
- "10002:10002"
|
||||
volumes:
|
||||
- azurite_data:/azurite:/data
|
||||
- ./.data/azurite:/data
|
||||
profiles:
|
||||
- storage
|
||||
- cloud
|
||||
@@ -152,5 +152,3 @@ volumes:
|
||||
mariadb_dev_data:
|
||||
rabbitmq_data:
|
||||
redis_data:
|
||||
azurite_data:
|
||||
mssql_data:
|
||||
|
||||
@@ -19,6 +19,7 @@ using Bit.Core.Enums;
|
||||
using Bit.Core.Exceptions;
|
||||
using Bit.Core.KeyManagement.Commands.Interfaces;
|
||||
using Bit.Core.KeyManagement.Kdf;
|
||||
using Bit.Core.KeyManagement.Models.Data;
|
||||
using Bit.Core.KeyManagement.Queries.Interfaces;
|
||||
using Bit.Core.Models.Api.Response;
|
||||
using Bit.Core.Repositories;
|
||||
@@ -447,13 +448,20 @@ public class AccountsController : Controller
|
||||
if (model.AccountKeys != null)
|
||||
{
|
||||
await _setAccountKeysForUserCommand.SetAccountKeysForUserAsync(user, model.AccountKeys);
|
||||
return new KeysResponseModel(model.AccountKeys?.ToAccountKeysData(), user.Key);
|
||||
}
|
||||
else
|
||||
{
|
||||
await _userService.SaveUserAsync(model.ToUser(user));
|
||||
return new KeysResponseModel(new UserAccountKeysData
|
||||
{
|
||||
PublicKeyEncryptionKeyPairData = new PublicKeyEncryptionKeyPairData(
|
||||
user.PrivateKey,
|
||||
user.PublicKey
|
||||
)
|
||||
}, user.Key);
|
||||
}
|
||||
|
||||
return new KeysResponseModel(model.AccountKeys.ToAccountKeysData(), user.Key);
|
||||
}
|
||||
|
||||
[HttpGet("keys")]
|
||||
|
||||
Reference in New Issue
Block a user