diff --git a/.gitignore b/.gitignore index c008a49d..cd1cef74 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ npm-debug.log shinobi.sqlite package-lock.json dist +._* diff --git a/libs/auth.js b/libs/auth.js index a3757a5e..f64543ff 100644 --- a/libs/auth.js +++ b/libs/auth.js @@ -175,7 +175,7 @@ module.exports = function(s,config,lang){ ){ if(!user.lang){ var details = s.parseJSON(user.details).lang - user.lang = s.getDefinitonFile(user.details.lang) || s.copySystemDefaultLanguage() + user.lang = s.getLanguageFile(user.details.lang) || s.copySystemDefaultLanguage() } onSuccessComplete(user) }else{ diff --git a/libs/customAutoLoad.js b/libs/customAutoLoad.js index 96824c5a..af950262 100644 --- a/libs/customAutoLoad.js +++ b/libs/customAutoLoad.js @@ -383,6 +383,35 @@ module.exports = async (s,config,lang,app,io) => { } },res,req) }) + // /** + // * API : Superuser : Custom Auto Load Package Update. + // */ + // app.post(config.webPaths.superApiPrefix+':auth/package/update', async (req,res) => { + // s.superAuth(req.params, async (resp) => { + // try{ + // const url = req.body.downloadUrl + // const packageRoot = req.body.packageRoot || '' + // const packageName = req.body.packageName || extractNameFromPackage(url) + // const modulePath = getModulePath(packageName) + // await downloadModule(url,packageName) + // const properties = getModuleProperties(packageName) + // const newName = await moveModuleToNameInProperties(modulePath,packageRoot,properties) + // const chosenName = newName ? newName : packageName + // + // disableModule(chosenName,true) + // s.closeJsonResponse(res,{ + // ok: true, + // moduleName: chosenName, + // newModule: getModule(chosenName) + // }) + // }catch(err){ + // s.closeJsonResponse(res,{ + // ok: false, + // error: err + // }) + // } + // },res,req) + // }) /** * API : Superuser : Custom Auto Load Package Install. */