commented out experience with database can block the chat at the moment

This commit is contained in:
NigeParis 2025-12-04 10:01:28 +01:00
parent 566d4ccd8e
commit 8959331b37

View file

@ -35,17 +35,17 @@ const route: FastifyPluginAsync = async (fastify): Promise<void> => {
}, },
async (req, res) => { async (req, res) => {
const users = fastify.db.getAllUsers(); // const users = fastify.db.getAllUsers();
console.log('ALL USERS EVER CONNECTED:', users); // console.log('ALL USERS EVER CONNECTED:', users);
if (!users) return; // if (!users) return;
for (const user of users) { // for (const user of users) {
console.log(color.yellow, 'USER:', user.name); // console.log(color.yellow, 'USER:', user.name);
} // }
// const usersBlocked = fastify.db.getAllBlockedUsers(); // // const usersBlocked = fastify.db.getAllBlockedUsers();
// console.log(color.red, "ALL BLOCKED USERS:", usersBlocked); // // console.log(color.red, "ALL BLOCKED USERS:", usersBlocked);
fastify.db.addBlockedUserFor(users[0].id, users[1].id); // fastify.db.addBlockedUserFor(users[0].id, users[1].id);
const usersBlocked2 = fastify.db.getAllBlockedUsers(); // const usersBlocked2 = fastify.db.getAllBlockedUsers();
console.log(color.green, 'ALL BLOCKED USERS:', usersBlocked2); // console.log(color.green, 'ALL BLOCKED USERS:', usersBlocked2);
res.makeResponse(200, 'success', 'CCChat.success', { name: 'name', 'id': req.authUser!.id, guest: false }); res.makeResponse(200, 'success', 'CCChat.success', { name: 'name', 'id': req.authUser!.id, guest: false });
}, },
); );