mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactored
This commit is contained in:
parent
a537c56e46
commit
ebeffdc16e
8 changed files with 133 additions and 79 deletions
|
|
@ -5,9 +5,6 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
"use strict";
|
||||
|
||||
var Cache = DOM.Cache,
|
||||
|
||||
APIURL,
|
||||
AuthURL,
|
||||
GithubLocal,
|
||||
User,
|
||||
GitHubStore = {};
|
||||
|
|
@ -73,19 +70,15 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
}
|
||||
};
|
||||
|
||||
GitHubStore.getUserData = function(pCallBack){
|
||||
var lName,
|
||||
|
||||
lShowUserInfo = function(pError, pData){
|
||||
if(!pError){
|
||||
lName = pData.name;
|
||||
Util.log('Hello ' + lName + ' :)!');
|
||||
}
|
||||
else
|
||||
DOM.Cache.remove('token');
|
||||
};
|
||||
|
||||
User.show(null, lShowUserInfo);
|
||||
GitHubStore.getUserData = function(pCallBack){
|
||||
User.show(null, function(pError, pData){
|
||||
if(!pError){
|
||||
var lName = pData.name;
|
||||
Util.log('Hello ' + lName + ' :)!');
|
||||
}
|
||||
else
|
||||
DOM.Cache.remove('token');
|
||||
});
|
||||
|
||||
Util.exec(pCallBack);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue