coctohug-web
Version:
- Nice localization with support of dozens of languages: [English](https://github.com/raingggg/coctohug/blob/main/readme_en.md), [العربية](https://github.com/raingggg/coctohug/blob/main/readme_ar.md), [Bulgarian](https://github.com/raingggg/coctohug/blob/
23 lines (17 loc) • 611 B
JavaScript
const express = require('express');
const router = express.Router();
const { hasMNCFile, blockchainConfig: { mncPath } } = require('../utils/chiaConfig');
const { AppConfig } = require('../models');
router.get('/', async (req, res, next) => {
const data = await AppConfig.findOne({
where: { key: 'password' }
});
if (!data) return res.redirect('/settingsWeb/createPasswordWeb');
const shouldRedirect = await hasMNCFile();
if (shouldRedirect) {
return res.redirect('/reviewWeb');
} else {
return res.render('index', { pageName: 'home', mncPath });
}
});
module.exports = router;