1
0
mirror of https://github.com/bitwarden/server synced 2026-01-08 11:33:26 +00:00

recompute full storage each time

This commit is contained in:
Kyle Spearrin
2017-07-10 22:08:52 -04:00
parent de8b2de8e6
commit 8684b9c8e5
10 changed files with 70 additions and 53 deletions

View File

@@ -32,13 +32,13 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task UpdateStorageAsync(Guid id, long storageIncrease)
public async Task UpdateStorageAsync(Guid id)
{
using(var connection = new SqlConnection(ConnectionString))
{
await connection.ExecuteAsync(
"[dbo].[Organization_UpdateStorage]",
new { Id = id, StorageIncrease = storageIncrease },
new { Id = id },
commandType: CommandType.StoredProcedure,
commandTimeout: 180);
}

View File

@@ -79,13 +79,13 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task UpdateStorageAsync(Guid id, long storageIncrease)
public async Task UpdateStorageAsync(Guid id)
{
using(var connection = new SqlConnection(ConnectionString))
{
await connection.ExecuteAsync(
$"[{Schema}].[{Table}_UpdateStorage]",
new { Id = id, StorageIncrease = storageIncrease },
new { Id = id },
commandType: CommandType.StoredProcedure,
commandTimeout: 180);
}