From bc2a9e2eb7f61310f91126dbcd3d0794425502d3 Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 8 Feb 2022 22:29:58 +0100 Subject: [PATCH] Add "activated": 1 to user document on created (TODO: change it later) --- api/src/api/accounts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/api/accounts.js b/api/src/api/accounts.js index ed1408e..be05cb6 100644 --- a/api/src/api/accounts.js +++ b/api/src/api/accounts.js @@ -25,7 +25,8 @@ module.exports = { const documen = await db.table.users().insertOne({ 'username': req.body.username, 'email': req.body.email, - 'password': pwd.cryptPassword(req.body.password) + 'password': pwd.cryptPassword(req.body.password), + 'activated': 1, // TODO: change to 0 and activate by email verification later }) if (documen.insertedCount > 0)