1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Updated PR comments, changed smart defaults for behavior, updated Cipher table index

This commit is contained in:
Chad Scharf
2020-03-27 10:23:37 -04:00
parent bc46eccf70
commit 55b937ff68
11 changed files with 26 additions and 22 deletions

View File

@ -23,8 +23,8 @@ namespace Bit.Core.Repositories
Task UpdatePartialAsync(Guid id, Guid userId, Guid? folderId, bool favorite);
Task UpdateAttachmentAsync(CipherAttachment attachment);
Task DeleteAttachmentAsync(Guid cipherId, string attachmentId);
Task DeleteAsync(Cipher obj, bool permanent = false);
Task DeleteAsync(IEnumerable<Guid> ids, Guid userId, bool permanent = false);
Task DeleteAsync(Cipher obj, bool permanent = true);
Task DeleteAsync(IEnumerable<Guid> ids, Guid userId, bool permanent = true);
Task MoveAsync(IEnumerable<Guid> ids, Guid? folderId, Guid userId);
Task DeleteByUserIdAsync(Guid userId);
Task DeleteByOrganizationIdAsync(Guid organizationId);

View File

@ -215,9 +215,9 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task DeleteAsync(Cipher obj, bool permanent = false)
public async Task DeleteAsync(Cipher obj, bool permanent = true)
{
using (var connection = new SqlConnection(ConnectionString))
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.ExecuteAsync(
$"[{Schema}].[Cipher_DeleteById]",
@ -226,7 +226,7 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task DeleteAsync(IEnumerable<Guid> ids, Guid userId, bool permanent = false)
public async Task DeleteAsync(IEnumerable<Guid> ids, Guid userId, bool permanent = true)
{
using(var connection = new SqlConnection(ConnectionString))
{