From b441cc3f3c3948c6e8dd7ca5263c7f81eebeef01 Mon Sep 17 00:00:00 2001 From: NigeParis Date: Thu, 4 Dec 2025 10:01:28 +0100 Subject: [PATCH] commented out experience with database can block the chat at the moment --- src/chat/src/routes/nginx-chat.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/chat/src/routes/nginx-chat.ts b/src/chat/src/routes/nginx-chat.ts index 1ba77c2..02162cc 100644 --- a/src/chat/src/routes/nginx-chat.ts +++ b/src/chat/src/routes/nginx-chat.ts @@ -35,17 +35,17 @@ const route: FastifyPluginAsync = async (fastify): Promise => { }, async (req, res) => { - const users = fastify.db.getAllUsers(); - console.log('ALL USERS EVER CONNECTED:', users); - if (!users) return; - for (const user of users) { - console.log(color.yellow, 'USER:', user.name); - } - // const usersBlocked = fastify.db.getAllBlockedUsers(); - // console.log(color.red, "ALL BLOCKED USERS:", usersBlocked); - fastify.db.addBlockedUserFor(users[0].id, users[1].id); - const usersBlocked2 = fastify.db.getAllBlockedUsers(); - console.log(color.green, 'ALL BLOCKED USERS:', usersBlocked2); + // const users = fastify.db.getAllUsers(); + // console.log('ALL USERS EVER CONNECTED:', users); + // if (!users) return; + // for (const user of users) { + // console.log(color.yellow, 'USER:', user.name); + // } + // // const usersBlocked = fastify.db.getAllBlockedUsers(); + // // console.log(color.red, "ALL BLOCKED USERS:", usersBlocked); + // fastify.db.addBlockedUserFor(users[0].id, users[1].id); + // const usersBlocked2 = fastify.db.getAllBlockedUsers(); + // console.log(color.green, 'ALL BLOCKED USERS:', usersBlocked2); res.makeResponse(200, 'success', 'CCChat.success', { name: 'name', 'id': req.authUser!.id, guest: false }); }, );