mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-05 15:58:03 -05:00
Fix login body verification
This commit is contained in:
parent
456cac6b17
commit
179bed8924
@ -86,7 +86,10 @@ router.post('/register',
|
||||
res.status(200).json({'message': 'Registration successful.'});
|
||||
}));
|
||||
|
||||
const loginProps = [{name: 'username', type: 'string'}, {name: 'password', type: 'string'}];
|
||||
const loginProps = [
|
||||
{name: 'username', type: 'string', optional: true},
|
||||
{name: 'displayname', type: 'string', optional: true},
|
||||
{name: 'password', type: 'string'}];
|
||||
router.post('/login', verifyBody(loginProps), canonicalizeRequest, wrap(async (req, res, next) => {
|
||||
// Authenticate
|
||||
const user = await authenticate(req, res, next);
|
||||
|
Loading…
Reference in New Issue
Block a user