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