Skip to content

Commit

Permalink
Fixed that sucka #23
Browse files Browse the repository at this point in the history
  • Loading branch information
inabahare committed Jan 1, 2019
1 parent 91c4829 commit 75a5eb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/Routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const router = express.Router();

// Check if user is logged in
router.use((req, res, next) => {
if (res.locals.user === null)
if (!res.locals.user)
return res.redirect("/login");

next();
Expand Down
5 changes: 4 additions & 1 deletion src/app/config/setup/database.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import db from "../../helpers/database";
import debug from "debug";
import bcrypt from "bcrypt";
import uuid from "uuid/v1";



class Database {
/**
Expand All @@ -27,7 +30,7 @@ class Database {
VALUES ($1, $2, $3, $4, $5);`, [
process.env.ADMIN_DEFAULT_USERNAME,
passwordHashed,
process.env.ADMIN_DEFAULT_TOKEN,
uuid(),
process.env.ADMIN_DEFAULT_UPLOAD_SIZE,
true
]);
Expand Down
2 changes: 1 addition & 1 deletion views/addusers.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{/if}}
<label for="password" class="label"Password></label>
<div class="control">
<input type="password" class="input" name="password" placeholder="password">
<input type="password" class="input" name="password" maxlength="73" placeholder="password" >
</div>
</div>

Expand Down

0 comments on commit 75a5eb9

Please sign in to comment.