add check timehhmm and pagans modifications
This commit is contained in:
@@ -87,6 +87,7 @@ Checkjson.schema.properties.format = {
|
||||
"date-time": /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d{1,3}/,
|
||||
stringalphaonly: /^[A-Za-z0-9]{3,}$/,
|
||||
time: /[0-2]\d:[0-5]\d:[0-5]\d\.\d{1,3}/,
|
||||
timehhmm:/^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/,
|
||||
date: /\d{4}-[01]\d-[0-3]\d/,
|
||||
duration: / /,
|
||||
email:
|
||||
|
@@ -49,6 +49,7 @@ Pagans.logout = (alias, tribe, xdays, xhash) => {
|
||||
*/
|
||||
|
||||
Pagans.keyrecovery = (emailalias, tribe, search, lg) => {
|
||||
if (log) console.log(currentmod,":try to recover emailalias, tribe, search, lg:",emailalias,tribe,search,lg);
|
||||
if (!["email", "alias"].includes(emailalias)) {
|
||||
return {
|
||||
status: 406,
|
||||
@@ -71,12 +72,14 @@ Pagans.keyrecovery = (emailalias, tribe, search, lg) => {
|
||||
} else {
|
||||
const personpath = `../../${tribe}/objects/persons/itm/${search}.json`;
|
||||
if (fs.existsSync(personpath)) {
|
||||
const person=fs.readFileSync(personpath)
|
||||
if (person.recoveryauth)
|
||||
emaillist.push({ alias: search, tribe, lg });
|
||||
}
|
||||
}
|
||||
emaillist.forEach((e) => {
|
||||
console.log(e);
|
||||
//const ret = Pagans.sendmailkey(e);
|
||||
const ret = Pagans.sendmailkey(e);
|
||||
});
|
||||
|
||||
if (emaillist.length > 0) {
|
||||
|
Reference in New Issue
Block a user