mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-01 20:22:29 +00:00
changed the way of getting github application id
This commit is contained in:
parent
288240726c
commit
ce5b7baaa4
4 changed files with 11 additions and 27 deletions
|
|
@ -43,13 +43,9 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
}
|
||||
|
||||
function setConfig(pCallBack){
|
||||
|
||||
DOM.ajax({
|
||||
url : GitHubIdURL,
|
||||
success : function(pData){
|
||||
GitHub_ID = pData;
|
||||
Util.exec(pCallBack);
|
||||
}
|
||||
cloudcmd.getConfig(function(pConfig){
|
||||
GitHub_ID = pConfig.github_key;
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,30 +105,12 @@
|
|||
*/
|
||||
function onGET(pParams){
|
||||
var lResult = {error: 'command not found'},
|
||||
lCmd = pParams.command,
|
||||
lConfig = main.config,
|
||||
lEnv = process.env,
|
||||
lEnvKey,
|
||||
lConfigKey;
|
||||
lCmd = pParams.command;
|
||||
|
||||
switch(lCmd){
|
||||
case '':
|
||||
lResult = {info: 'Cloud Commander API v1'};
|
||||
break;
|
||||
|
||||
case 'github_key':
|
||||
lEnvKey = lEnv.github_key;
|
||||
lConfigKey = lConfig.github_key,
|
||||
|
||||
lResult = lEnvKey || lConfigKey;
|
||||
break;
|
||||
|
||||
case 'dropbox_chooser_key':
|
||||
lEnvKey = lEnv.dropbox_chooser_key;
|
||||
lConfigKey = lConfig.dropbox_chooser_key;
|
||||
|
||||
lResult = lEnvKey || lConfigKey;
|
||||
break;
|
||||
|
||||
case 'kill':
|
||||
pParams.data = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue