Added 'altcha' captcha system for account and channel creation.
This commit is contained in:
parent
60801f0dc2
commit
e0f53df176
20 changed files with 326 additions and 55 deletions
|
|
@ -17,7 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
//Config
|
||||
const config = require('../../config.json');
|
||||
|
||||
//Local Imports
|
||||
const altchaUtils = require('../utils/altchaUtils');
|
||||
|
||||
//register page functions
|
||||
module.exports.get = function(req, res){
|
||||
res.render('register', {instance: config.instanceName, user: req.session.user});
|
||||
module.exports.get = async function(req, res){
|
||||
//Generate captcha
|
||||
const challenge = await altchaUtils.genCaptcha();
|
||||
|
||||
//Render page
|
||||
return res.render('register', {instance: config.instanceName, user: req.session.user, challenge});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue