1
0
mirror of https://github.com/Foltik/Shimapan synced 2025-01-05 15:58:03 -05:00

Add auth requirement on home and panel

This commit is contained in:
Jack Foltz 2018-08-14 05:14:53 -04:00
parent c42a012229
commit 50a96c9e95
Signed by: foltik
GPG Key ID: 303F88F996E95541
2 changed files with 10 additions and 8 deletions

View File

@ -1,8 +1,9 @@
var express = require('express');
var router = express.Router();
var path = require('path');
const express = require('express');
const router = express.Router();
const path = require('path');
const requireAuth = require('../util/auth').requireAuth;
router.get('/', function(req, res) {
router.get('/', requireAuth(), function(req, res) {
res.sendFile(path.join(__dirname, '../../public/views', 'home.html'));
});

View File

@ -1,8 +1,9 @@
var express = require('express');
var router = express.Router();
var path = require('path');
const express = require('express');
const router = express.Router();
const path = require('path');
const requireAuth = require('../util/auth').requireAuth;
router.get('/', function(req, res) {
router.get('/', requireAuth(), function(req, res) {
res.sendFile(path.join(__dirname, '../../public/views', 'panel.html'));
});