separated electron routing into separate file

This commit is contained in:
azivner
2017-11-30 20:51:35 -05:00
parent 7bdf269095
commit 471821ebe5
6 changed files with 46 additions and 41 deletions

View File

@@ -15,7 +15,7 @@ async function checkAuth(req, res, next) {
}
}
async function checkAuthWithoutMigration(req, res, next) {
async function checkAuthForMigrationPage(req, res, next) {
if (!req.session.loggedIn && !utils.isElectron()) {
res.redirect("login");
}
@@ -36,7 +36,7 @@ async function checkApiAuth(req, res, next) {
}
}
async function checkApiAuthWithoutMigration(req, res, next) {
async function checkApiAuthForMigrationPage(req, res, next) {
if (!req.session.loggedIn && !utils.isElectron()) {
res.status(401).send("Not authorized");
}
@@ -47,7 +47,7 @@ async function checkApiAuthWithoutMigration(req, res, next) {
module.exports = {
checkAuth,
checkAuthWithoutMigration,
checkAuthForMigrationPage,
checkApiAuth,
checkApiAuthWithoutMigration
checkApiAuthForMigrationPage
};