Skip to content

Commit

Permalink
Fix regression introduced by c80d8b1
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpixel committed Nov 29, 2017
1 parent c80d8b1 commit 444a931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/AuthController.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports.postSignIn = (req, res, next) => {
if (!req.body.username || !req.body.password) return res.status(400).json({success: false, error: {message: "A username and password are required."}});
passport.authenticate("local", function(err, user, info) {
if (!user) return res.status(403).json({success: false, error: info.error || {message: "A username and password are required."}});
if (!user.admin && config.maintenance && !config.maintenance.allowSignins) return res.status(403).json({
if (!user.admin && config.maintenance && !config.maintenance.allowLogins) return res.status(403).json({
success: false,
error: {
message: 'Logins disabled. Please do not call this endpoint any futher.'
Expand Down

1 comment on commit 444a931

@nullpixel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is why you should have unit tests kiddos

Please # to comment.