mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-16 01:47:30 +01:00
Merge branch 'master' of https://github.com/spacedeck/spacedeck-open
This commit is contained in:
@@ -25,7 +25,10 @@ router.post('/', function(req, res) {
|
||||
res.sendStatus(404);
|
||||
})
|
||||
.then(user => {
|
||||
if (bcrypt.compareSync(password, user.password_hash)) {
|
||||
if (!user) {
|
||||
res.sendStatus(404);
|
||||
}
|
||||
else if (bcrypt.compareSync(password, user.password_hash)) {
|
||||
crypto.randomBytes(48, function(ex, buf) {
|
||||
var token = buf.toString('hex');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user