mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-23 12:10:40 +03:00
12 lines
451 B
JavaScript
12 lines
451 B
JavaScript
|
const { User } = require("../../classes/index");
|
||
|
const { get } = require("quick.db")
|
||
|
module.exports = (req, res) => {
|
||
|
if (!req.session.loggedin) return res.redirect('/login');
|
||
|
|
||
|
const mem = process.memoryUsage().heapUsed / Math.pow(2, 20);
|
||
|
const users = get("users").length;
|
||
|
const threads = get("threads").length;
|
||
|
|
||
|
const user = new User().getId(req.session.userid)
|
||
|
res.render("index", { mem, user, users, threads })
|
||
|
}
|