generated from lucien/api-template
add: added a user page and button to delete them
This commit is contained in:
parent
6c19015a29
commit
4045681913
8 changed files with 235 additions and 1 deletions
|
@ -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' });
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue