minor cleanup

install-with-shinobicctv-user-instead-of-root
Moe Alam 2020-09-13 23:53:51 -07:00
parent 52d5fc859d
commit 55329bb4ae
3 changed files with 31 additions and 1 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ npm-debug.log
shinobi.sqlite
package-lock.json
dist
._*

View File

@ -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{

View File

@ -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.
*/