mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-07 08:42:49 -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');
|
const express = require('express');
|
||||||
var router = express.Router();
|
const router = express.Router();
|
||||||
var path = require('path');
|
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'));
|
res.sendFile(path.join(__dirname, '../../public/views', 'home.html'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
var express = require('express');
|
const express = require('express');
|
||||||
var router = express.Router();
|
const router = express.Router();
|
||||||
var path = require('path');
|
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'));
|
res.sendFile(path.join(__dirname, '../../public/views', 'panel.html'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user