Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updates

  • Loading branch information...
commit 11b4332540caca12b84055face64fb2bf9a8626f 1 parent b462816
@andrerod andrerod authored
Showing with 23 additions and 7 deletions.
  1. +13 −5 lib/cli/commands/siteconfig.js
  2. +10 −2 lib/cli/commands/siteconfig_.js
View
18 lib/cli/commands/siteconfig.js
@@ -92,7 +92,7 @@ exports.init = function(cli) {
- siteConfig.command("set <key> [name]").usage("[options] <key> [name]").description("Sets an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __2(keyvaluepair, name, options, _) { var context, siteConfigurations, siteConfig; var __frame = { name: "__2", line: 99 }; return __func(_, this, arguments, __2, 3, __frame, function __$__2() {
+ siteConfig.command("set <keyvaluepair> [name]").usage("[options] <keyvaluepair> [name]").description("Sets an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __2(keyvaluepair, name, options, _) { var context, setting, siteConfigurations, siteConfig; var __frame = { name: "__2", line: 99 }; return __func(_, this, arguments, __2, 3, __frame, function __$__2() {
@@ -105,15 +105,23 @@ exports.init = function(cli) {
keyvaluepair: options.keyvaluepair };
- return site.lookupSiteNameAndWebSpace(context, __cb(_, __frame, 9, 6, function __$__2() {
- return site.doSiteConfigGet(context, __cb(_, __frame, 10, 31, function ___(__0, __1) { siteConfigurations = __1;
+ console.log(context);
+ setting = context.keyvaluepair.split("=");
+
+ return site.lookupSiteNameAndWebSpace(context, __cb(_, __frame, 12, 6, function __$__2() {
+ return site.doSiteConfigGet(context, __cb(_, __frame, 13, 31, function ___(__0, __1) { siteConfigurations = __1;
+ siteConfigurations.AppSettings[setting[0]] = setting[1];
+
+ console.log(siteConfigurations);
+
siteConfig = {
SiteConfig: siteConfigurations };
- return site.doSiteConfigPUT(siteConfig, context, __cb(_, __frame, 14, 6, _, true)); }, true)); }, true)); }); });
+
+ return site.doSiteConfigPUT(siteConfig, context, __cb(_, __frame, 22, 6, _, true)); }, true)); }, true)); }); });
- siteConfig.command("unset <key> [name]").usage("[options] <keyvaluepair> [name]").description("Unsets an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __3(keyvaluepair, name, options, _) { var context; var __frame = { name: "__3", line: 120 }; return __func(_, this, arguments, __3, 3, __frame, function __$__3() {
+ siteConfig.command("unset <key> [name]").usage("[options] <keyvaluepair> [name]").description("Unsets an application setting for your site").option("-s, --subscription <id>", "use the subscription id").execute(function __3(keyvaluepair, name, options, _) { var context; var __frame = { name: "__3", line: 128 }; return __func(_, this, arguments, __3, 3, __frame, function __$__3() {
View
12 lib/cli/commands/siteconfig_.js
@@ -92,8 +92,8 @@ exports.init = function (cli) {
}
});
- siteConfig.command('set <key> [name]')
- .usage('[options] <key> [name]')
+ siteConfig.command('set <keyvaluepair> [name]')
+ .usage('[options] <keyvaluepair> [name]')
.description('Sets an application setting for your site')
.option('-s, --subscription <id>', 'use the subscription id')
.execute(function (keyvaluepair, name, options, _) {
@@ -105,11 +105,19 @@ exports.init = function (cli) {
keyvaluepair: options.keyvaluepair
};
+ console.log(context);
+ var setting = context.keyvaluepair.split('=');
+
site.lookupSiteNameAndWebSpace(context, _);
var siteConfigurations = site.doSiteConfigGet(context, _);
+ siteConfigurations.AppSettings[setting[0]] = setting[1];
+
+ console.log(siteConfigurations);
+
var siteConfig = {
SiteConfig: siteConfigurations
};
+
site.doSiteConfigPUT(siteConfig, context, _);
});
Please sign in to comment.
Something went wrong with that request. Please try again.