diff --git a/src/index.ts b/src/index.ts index bd2d8e2..5a73ce3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -539,15 +539,14 @@ api.post('/set-ip/:domain', domainAuthorization, async (req, res) => { const checkManaged: RequestHandler = (req, res, next) => { if (!req.body.name || !req.body.password) { - return next(new Error('missing_fields')); + return next(new Error('Missing name or password')); } // Find user account const findUser = managed.getAccount(req.body.name); if (!findUser) { - return next(new Error('invalid')); + return next(new Error('Invalid name or password')); } - console.log(findUser); // Validate password managed.validatePassword(findUser, req.body.password).then((success) => { @@ -556,7 +555,7 @@ const checkManaged: RequestHandler = (req, res, next) => { return next(); } - next(new Error('invalid')); + next(new Error('Invalid name or password')); }); }