blockstarter-wl
Advanced tools
Comparing version 0.0.30 to 0.0.31
// Generated by LiveScript 1.5.0 | ||
(function(){ | ||
var superagent, url, check, required, sidBased, support, address, auth, changePassword, updateProfile, contributors, forgotPassword, resetPassword, panel, helpMe, out$ = typeof exports != 'undefined' && exports || this; | ||
var superagent, url, check, required, sidBased, support, address, auth, confirmEmail, changePassword, updateProfile, contributors, forgotPassword, resetPassword, panel, helpMe, out$ = typeof exports != 'undefined' && exports || this; | ||
superagent = require('superagent'); | ||
@@ -94,2 +94,28 @@ url = function(root, part){ | ||
}; | ||
out$.confirmEmail = confirmEmail = function(storage, cb){ | ||
var apiKey, sessionId, confirmationId, transport, baseUrl, isBrowser, fullurl; | ||
apiKey = storage.apiKey, sessionId = storage.sessionId, confirmationId = storage.confirmationId, transport = storage.transport, baseUrl = storage.baseUrl, isBrowser = storage.isBrowser; | ||
if (confirmUrl.loading === true && isBrowser) { | ||
return cb("Already in process"); | ||
} | ||
confirmUrl.loading = true; | ||
required({ | ||
apiKey: apiKey, | ||
sessionId: sessionId, | ||
newPassword: newPassword, | ||
oldPassword: oldPassword, | ||
baseUrl: baseUrl | ||
}); | ||
fullurl = url(baseUrl, 'confirm-email'); | ||
return superagent.post(fullurl).send({ | ||
confirmationId: confirmationId, | ||
transport: transport | ||
}).set('api-key', apiKey).set('sid', sessionId).end(function(err, resp){ | ||
delete confirmUrl.loading; | ||
if (err != null) { | ||
return cb(err); | ||
} | ||
cb(null, JSON.parse(resp.text)); | ||
}); | ||
}; | ||
out$.changePassword = changePassword = function(storage, cb){ | ||
@@ -96,0 +122,0 @@ var apiKey, sessionId, newPassword, oldPassword, transport, baseUrl, isBrowser, fullurl; |
{ | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/blockstarter/white-label.git" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"homepage": "https://github.com/blockstarter/white-label#readme", | ||
"subversion": 30, | ||
"description": "Blockstarter white-label API for integration", | ||
"main": "blockstarter.js", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/blockstarter/white-label/issues" | ||
}, | ||
"license": "ISC", | ||
"version": "0.0.30", | ||
"name": "blockstarter-wl", | ||
"main": "blockstarter.js", | ||
"description": "Blockstarter white-label API for integration", | ||
"subversion": 31, | ||
"homepage": "https://github.com/blockstarter/white-label#readme", | ||
"dependencies": { | ||
"superagent": "^3.6.0" | ||
}, | ||
"uperversion": "0.0", | ||
"author": "Blockstarter Inc", | ||
"keywords": [ | ||
@@ -23,7 +19,11 @@ "white-label", | ||
], | ||
"author": "Blockstarter Inc", | ||
"uperversion": "0.0", | ||
"dependencies": { | ||
"superagent": "^3.6.0" | ||
"name": "blockstarter-wl", | ||
"version": "0.0.31", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/blockstarter/white-label.git" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
125918
434