notherbase-fs 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/user.js +2 -1
- package/package.json +2 -1
package/controllers/user.js
CHANGED
|
@@ -177,7 +177,7 @@ export default class User {
|
|
|
177
177
|
code: "",
|
|
178
178
|
expires: 0
|
|
179
179
|
},
|
|
180
|
-
sessions:
|
|
180
|
+
sessions: {}
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
success(res, "Registration successful!");
|
|
@@ -211,6 +211,7 @@ export default class User {
|
|
|
211
211
|
let result = await this.validatePassword(req, req.body.password, spirit);
|
|
212
212
|
if (result === "Authenticated.") {
|
|
213
213
|
req.session.currentUser = req.body.username;
|
|
214
|
+
if (typeof spirit.memory.data.sessions !== "object" || Array.isArray(spirit.memory.data.sessions)) spirit.memory.data.sessions = {};
|
|
214
215
|
spirit.memory.data.sessions[req.session.id] = Date.now() + 1000 * 60 * 60 * 24 * 28; // 28 days
|
|
215
216
|
await spirit.commit();
|
|
216
217
|
success(res, "Login successful!", req.body.username);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notherbase-fs",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"description": "Functions to help make developing for NotherBase easier.",
|
|
5
5
|
"exports": "./notherbase-fs.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"express-subdomain": "^1.0.6",
|
|
29
29
|
"googleapis": "^100.0.0",
|
|
30
30
|
"mongoose": "^8.6.2",
|
|
31
|
+
"node-fetch": "^3.3.2",
|
|
31
32
|
"nodemailer": "^6.9.14",
|
|
32
33
|
"serve-favicon": "^2.5.0",
|
|
33
34
|
"socket.io": "^4.4.1",
|