Skip to content

Commit

Permalink
support servicekeys
Browse files Browse the repository at this point in the history
  • Loading branch information
leeliu committed Oct 11, 2017
1 parent 5b23604 commit f26254c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,15 @@ properties.parse(DEFAULT_CONF_FILE, { path: true }, function(error, config) {
if (config.account !== body.account) {
config.account = body.account;
config.token = null;
config.servicekey = null;
}
config.key = body.key;
if (body.token) { config.token = body.token; } // save token if available

if (body.servicekeys && body.servicekeys.length) {
config.servicekey = body.servicekeys[0];
}

saveConfig(config, function() {
log('Thank you for signing up! Your Ingestion Key is: ' + body.key + '. Saving credentials to local config.');
log();
Expand Down

0 comments on commit f26254c

Please sign in to comment.