add: added a user page and button to delete them

This commit is contained in:
Lukian 2025-04-09 15:26:48 +02:00
parent 6c19015a29
commit 4045681913
8 changed files with 235 additions and 1 deletions

View file

@ -50,6 +50,12 @@ router.post('/register', async (req, res) => {
const hash = sha256(password);
await addUser(connection, username, hash);
connection.end();
req.sockets.emit({
type: 'new_user',
username: username,
});
res.send({ message: 'User added' });
});