-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Refactoring, comments and removal of request dep
- Loading branch information
1 parent
7ce059f
commit 0d70ba1
Showing
10 changed files
with
61 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/** | ||
* Generate a key | ||
*/ | ||
var keygen = function() { | ||
var Keys = require('../keys') | ||
, keys = new Keys(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
/** | ||
* Show current key | ||
*/ | ||
var showkey = function() { | ||
var Keys = require('../keys') | ||
, keys = new Keys(); | ||
var Keys = require('../keys'), | ||
keys = new Keys(); | ||
|
||
keys.getLocal(function(err, key) { | ||
if(err) return console.error(err); | ||
if(!key) { | ||
console.log('No key file found. Run the following to create one:'); | ||
console.log(); | ||
console.log('dpd keygen'); | ||
console.log(); | ||
return; | ||
} | ||
console.log("Copy this key for use in remote dashboard"); | ||
keys.getLocal(function(err, key) { | ||
if(err) return console.error(err); | ||
if(!key) { | ||
console.log('No key file found. Run the following to create one:'); | ||
console.log(); | ||
console.log(key); | ||
console.log('dpd keygen'); | ||
console.log(); | ||
}); | ||
} | ||
return; | ||
} | ||
console.log("Copy this key for use in remote dashboard"); | ||
console.log(); | ||
console.log(key); | ||
console.log(); | ||
}); | ||
} | ||
|
||
module.exports = showkey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters