maj apxtri and notification registrations
This commit is contained in:
@@ -40,10 +40,15 @@ Notifications.registertolist = (key, typekey, tribe, mlist, srckey, uuid) => {
|
||||
status: 400,
|
||||
ref: "Notifications",
|
||||
msg: "formaterror",
|
||||
data: { fielderr: typekey, format: typekey },
|
||||
data: { fielderr: typekey, format: typekey }
|
||||
};
|
||||
|
||||
const destin = `../nationchains/tribes/${tribe}/objects/maillinglists/${typekey}_${mlist}.json`;
|
||||
console.log(destin)
|
||||
if (!fs.existsSync(destin)){
|
||||
console.log(`######## Attention tentative d'ecriture non autorisé,le fichier n'existe pas ${destin} créer le à la main vide {}`)
|
||||
return {status:406,ref:"Notifications",msg:"destinnotallow",data:{destin}}
|
||||
}
|
||||
|
||||
const filestorage = fs.existsSync(destin) ? fs.readJsonSync(destin) : {};
|
||||
//if (log) console.log(currentmod,`filestorage`,filestorage, key, (filestorage[key]));
|
||||
if (filestorage[key]) {
|
||||
|
@@ -181,7 +181,7 @@ Odmdb.Schema = (objectPathname, validschema, lg="en") => {
|
||||
// lance requete http pour recuperer le schema avec un await axios
|
||||
} else {
|
||||
schemaPath = `../nationchains/tribes/${schemaPath}`;
|
||||
console.log(path.resolve(schemaPath))
|
||||
if (log) console.log(currentmod,"resolve path schemaPath:",path.resolve(schemaPath))
|
||||
if (!fs.existsSync(schemaPath)) {
|
||||
return {};
|
||||
} else {
|
||||
|
@@ -9,7 +9,8 @@ const Notifications = require("./Notifications.js");
|
||||
const Odmdb = require("./Odmdb.js");
|
||||
|
||||
const conf = require(`../../conf/townconf.json`);
|
||||
|
||||
const currentmod = "Pagans";
|
||||
const log = conf.api.activelog.includes(currentmod);
|
||||
/**
|
||||
* Pagan Management numeric Identity and Person (Person = Pagan Id + tribe)
|
||||
*
|
||||
|
@@ -7,5 +7,7 @@
|
||||
"errsendsms":"Une erreur s'est produite lors de l'envoie du sms",
|
||||
"successfullsentsms":"Sms bien envoyé à {{To}}",
|
||||
"registersuccess":"Vous avez bien été enregistré pour être recontacté.",
|
||||
"formaterror":"Verifier vos données"
|
||||
"formaterror":"Verifier vos données",
|
||||
"typekeyunknown":"Verifier typekey qui doit etre email ou telephone et qui est {{typeky}}",
|
||||
"destinnotallow":"Check {{destin}} that not exist"
|
||||
}
|
Reference in New Issue
Block a user