From 43f26925d191289aba5de18c08925d075826c2f3 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 19 Sep 2019 09:23:48 -0400 Subject: [PATCH] fixes for meta repo and iapcheck model --- src/Api/Controllers/AccountsController.cs | 2 +- src/Core/Repositories/TableStorage/MetaDataRepository.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Api/Controllers/AccountsController.cs b/src/Api/Controllers/AccountsController.cs index 258168143..bfc71e6ec 100644 --- a/src/Api/Controllers/AccountsController.cs +++ b/src/Api/Controllers/AccountsController.cs @@ -442,7 +442,7 @@ namespace Bit.Api.Controllers } [HttpPost("iap-check")] - public async Task PostIapCheck(IapCheckRequestModel model) + public async Task PostIapCheck([FromBody]IapCheckRequestModel model) { var user = await _userService.GetUserByPrincipalAsync(User); if(user == null) diff --git a/src/Core/Repositories/TableStorage/MetaDataRepository.cs b/src/Core/Repositories/TableStorage/MetaDataRepository.cs index 630d30a2e..15b957693 100644 --- a/src/Core/Repositories/TableStorage/MetaDataRepository.cs +++ b/src/Core/Repositories/TableStorage/MetaDataRepository.cs @@ -51,7 +51,8 @@ namespace Bit.Core.Repositories.TableStorage { entity = new DictionaryEntity { - PartitionKey = id + PartitionKey = $"{objectName}_{id}", + RowKey = string.Empty }; } if(entity.ContainsKey(keyValuePair.Key)) @@ -66,7 +67,8 @@ namespace Bit.Core.Repositories.TableStorage { var entity = new DictionaryEntity { - PartitionKey = $"{objectName}_{id}" + PartitionKey = $"{objectName}_{id}", + RowKey = string.Empty }; foreach(var item in dict) { @@ -82,6 +84,7 @@ namespace Bit.Core.Repositories.TableStorage await _table.ExecuteAsync(TableOperation.Delete(new DictionaryEntity { PartitionKey = $"{objectName}_{id}", + RowKey = string.Empty, ETag = "*" })); }