Fix json parse issue (#738)
This commit is contained in:
Родитель
2aafd8a123
Коммит
4a1539f99f
|
@ -297,7 +297,7 @@ class AccountManager {
|
|||
const appParams = await this._adapter.parseApiAppName(appName);
|
||||
const requestBody = targetRelease ? {
|
||||
label: targetRelease
|
||||
} : null;
|
||||
} : {};
|
||||
|
||||
await this._requestManager.post(urlEncode`/apps/${appParams.appOwner}/${appParams.appName}/deployments/${deploymentName}/rollback_release`, JSON.stringify(requestBody), /*expectResponseBody=*/ false);
|
||||
return null;
|
||||
|
|
|
@ -271,13 +271,17 @@ class Adapter {
|
|||
public toRestReleaseModification(
|
||||
legacyCodePushReleaseInfo: sdkTypes.PackageInfo
|
||||
): adapterTypes.ReleaseModification {
|
||||
const releaseModification: adapterTypes.ReleaseModification = {
|
||||
target_binary_range: legacyCodePushReleaseInfo.appVersion,
|
||||
is_disabled: legacyCodePushReleaseInfo.isDisabled,
|
||||
is_mandatory: legacyCodePushReleaseInfo.isMandatory,
|
||||
description: legacyCodePushReleaseInfo.description,
|
||||
rollout: legacyCodePushReleaseInfo.rollout
|
||||
};
|
||||
let releaseModification: adapterTypes.ReleaseModification = {} as adapterTypes.ReleaseModification ;
|
||||
|
||||
if (legacyCodePushReleaseInfo.appVersion) releaseModification.target_binary_range = legacyCodePushReleaseInfo.appVersion;
|
||||
|
||||
if (legacyCodePushReleaseInfo.isDisabled) releaseModification.is_disabled = legacyCodePushReleaseInfo.isDisabled;
|
||||
|
||||
if (legacyCodePushReleaseInfo.isMandatory) releaseModification.is_mandatory = legacyCodePushReleaseInfo.isMandatory;
|
||||
|
||||
if (legacyCodePushReleaseInfo.description) releaseModification.description = legacyCodePushReleaseInfo.description;
|
||||
|
||||
if (legacyCodePushReleaseInfo.rollout) releaseModification.rollout = legacyCodePushReleaseInfo.rollout;
|
||||
|
||||
if (legacyCodePushReleaseInfo.label) releaseModification.label = legacyCodePushReleaseInfo.label;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче