public async patchApplicationSettingsSlot()

in src/appservice-rest/Arm/azure-app-service.ts [200:221]


    public async patchApplicationSettingsSlot(addProperties: any): Promise<boolean> {
        var appSettingsSlotSettings = await this.getSlotConfigurationNames();
        let appSettingNames = appSettingsSlotSettings.properties.appSettingNames;
        var isNewValueUpdated: boolean = false;
        if(appSettingNames) {
            for(var key in addProperties) {
                if(addProperties[key].slotSetting == true) {
                    if((appSettingNames.length == 0) || (!appSettingNames.includes(addProperties[key].name))) {
                        appSettingNames.push(addProperties[key].name);
                    }
                    core.debug(`Slot setting updated for key : ${addProperties[key].name}`);
                    isNewValueUpdated = true;
                }
            }
        }

        if(isNewValueUpdated) {
            await this.updateSlotConfigSettings(appSettingsSlotSettings);
        }

        return isNewValueUpdated;
    }