added:
db users
admin user edit
cleared router
cleared sql
new sid creation
new log creation
cleaned code (a bit) (
removed db check value function and replaced with get one value.
This commit is contained in:
2023-07-08 03:47:32 +05:00
parent c25bd2e274
commit e628d10ec7
20 changed files with 902 additions and 563 deletions

View File

@ -27,15 +27,15 @@ module.exports.load = (inp,cook,res)=>{
module.exports.new = (inp,cook,res)=>{
try {
db.cv("objects","name",inp["name"],(include)=>{
if(include){
db.ggv("objects","id","name",`'${inp["name"]}'`,(db_name)=>{db_name= db_name[0]
if(db_name != null){
res.send({out:"bad",err:"name"});
}
else if (!include){
db.nr("objects","`name`,`img`,`height`,`width`,`description`",`'${inp["name"]}','${inp["img"]}','${inp["height"]}','${inp["width"]}','${inp["desc"]}'`);
else if (db_name == null){
db.nr("objects","`name`,`img`,`height`,`width`,`description`",`'${inp["name"]}','${inp["img"]}','${inp["height"]}','${inp["width"]}','${inp["desc"]}'`,true);
res.send({out:"good"});
}
})
},true)
} catch (error) {
func.log("backend object creating error - "+error);
}