[需求]凭据管理远端功能开发

Signed-off-by: @shi-xiaoxiao-iris <shixiaoxiao2@huawei.com>
This commit is contained in:
@shi-xiaoxiao-iris
2022-07-04 17:18:56 +08:00
parent 60258c9c75
commit eda7ff7098
2 changed files with 5 additions and 5 deletions
@@ -411,7 +411,7 @@ void from_json(const nlohmann::json &jsonObject, PeerCredentialInfo &peerCredent
}
}
void to_json( nlohmann::json &jsonObject, const PeerCredentialInfo &peerCredentialInfo)
void to_json(nlohmann::json &jsonObject, const PeerCredentialInfo &peerCredentialInfo)
{
jsonObject[FIELD_DEVICE_ID] = peerCredentialInfo.peerDeviceId;
}
@@ -783,7 +783,7 @@ int32_t HiChainConnector::addMultiMembers(const int32_t groupType, const std::st
return ERR_DM_INPUT_PARAMETER_EMPTY;
}
LOGI("addMultiMembers in!");
if ( userId.empty() || !jsonDeviceList.contains(FIELD_DEVICE_LIST)) {
if (userId.empty() || !jsonDeviceList.contains(FIELD_DEVICE_LIST)) {
LOGE("userId or deviceList is empty");
return ERR_DM_INPUT_PARAMETER_EMPTY;
}
@@ -806,7 +806,7 @@ int32_t HiChainConnector::addMultiMembers(const int32_t groupType, const std::st
return ERR_DM_FAILED;
}
int32_t ret = deviceGroupManager_->addMultiMembersToGroup(osAccountUserId,
appId.c_str(), addParams.c_str());
appId.c_str(), addParams.c_str());
if (ret!= DM_OK) {
LOGE("HiChainConnector::addMultiMemberstoGroup failure! ret=%d", ret);
return ret;
@@ -815,7 +815,7 @@ int32_t HiChainConnector::addMultiMembers(const int32_t groupType, const std::st
}
int32_t HiChainConnector::deleteMultiMembers(const int32_t groupType, const std::string userId,
const nlohmann::json &jsonDeviceList)
const nlohmann::json &jsonDeviceList)
{
if (deviceGroupManager_ == nullptr) {
LOGE("HiChainConnector::deviceGroupManager_ is nullptr.");
@@ -842,7 +842,7 @@ int32_t HiChainConnector::deleteMultiMembers(const int32_t groupType, const std:
return ERR_DM_FAILED;
}
int32_t ret = deviceGroupManager_->delMultiMembersFromGroup(osAccountUserId,
appId.c_str(), deleteParams.c_str());
appId.c_str(), deleteParams.c_str());
if (ret != DM_OK) {
LOGE("HiChainConnector::deleteMultiMembers failure!, ret=%d", ret);
return ret;