mirror of https://github.com/tycrek/ass
parent
823d2a66a6
commit
91824803a1
@ -1,8 +1,11 @@
|
||||
import fs from 'fs-extra';
|
||||
import { path } from '@tycrek/joint';
|
||||
import { Router, json as BodyParserJson } from 'express';
|
||||
import { log } from '../log';
|
||||
|
||||
const router = Router({ caseSensitive: true });
|
||||
const userConfigExists = fs.pathExistsSync(path.join('userconfig.json'));
|
||||
|
||||
router.get('/', (req, res) => res.render('index'));
|
||||
router.get('/', (req, res) => userConfigExists ? res.render('index') : res.redirect('/setup'));
|
||||
|
||||
export { router };
|
||||
|
Loading…
Reference in new issue