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:
parent
c42a012229
commit
50a96c9e95
@ -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'));
|
||||
});
|
||||
|
||||
|
@ -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'));
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user