28
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -122,2 +122,10 @@ 'use strict'; | ||
$28.prototype.resetPassword = function(email, password, token) { | ||
return this.api.Account.updateAccount({ | ||
email: email, | ||
password: password, | ||
token: token | ||
}); | ||
}; | ||
$28.prototype.existsProject = function(name) { | ||
@@ -124,0 +132,0 @@ return this.api.Project.checkProject({ |
@@ -30,2 +30,26 @@ 'use strict'; | ||
}); | ||
}); | ||
//Reset password Command | ||
cli | ||
.command('reset-password <email>') | ||
.description('Reset 28.io password.') | ||
.action(function(email){ | ||
if(!email) { | ||
console.log('Need email to reset password: 28 -h for more infos'); | ||
return; | ||
} | ||
read({ prompt: 'New password: ', silent: true, replace: '*' }, function(er, password) { | ||
read({ prompt: 'New password (confirmation):', silent: true, replace: '*' }, function(er, passwordConfirmation){ | ||
if(password !== passwordConfirmation) { | ||
throw new Error('Passwords don\'t match'); | ||
} | ||
$28.resetPassword(email, password, Config.getAccessToken()) | ||
.then(function(){ | ||
console.log('Password changed'.green); | ||
}) | ||
.catch(Config.handleAPIError); | ||
}); | ||
}); | ||
}); |
@@ -9,3 +9,3 @@ { | ||
"description": "Command line utility to download and upload 28.io queries.", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"keywords": [ | ||
@@ -28,3 +28,3 @@ "jsoniq", | ||
"dependencies": { | ||
"28.io-nodejs": "0.3.2", | ||
"28.io-nodejs": "0.4.0", | ||
"cat-settings": "~1.0.0", | ||
@@ -31,0 +31,0 @@ "colors": "^1.0.3", |
187406
1330
35
+ Added28.io-nodejs@0.4.0(transitive)
- Removed28.io-nodejs@0.3.2(transitive)
Updated28.io-nodejs@0.4.0