diff --git a/apxtri/models/Pagans.js b/apxtri/models/Pagans.js index 32d8ead..35a7962 100644 --- a/apxtri/models/Pagans.js +++ b/apxtri/models/Pagans.js @@ -58,12 +58,28 @@ Pagans.keyrecovery = (emailalias, tribe, search, lg) => { search, lg ); + if (!search || search.length<3) { + console.log( + currentmod, + "issue with search : emailalias, tribe, search, lg:", + emailalias, + tribe, + search, + lg + ); + return { + status: 406, + ref: "Pagans", + msg: "nosearchstring", + data: {emailalias,tribe,search,lg}, + }; + } if (!["email", "alias"].includes(emailalias)) { return { status: 406, ref: "Pagans", msg: "emailaliasnotemailoralias", - data: {}, + data: {emailalias,tribe,search,lg}, }; } let emaillist = [];