mirror of https://github.com/tycrek/ass
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
617 B
17 lines
617 B
import { path } from '@tycrek/joint';
|
|
import { Router, json as BodyParserJson } from 'express';
|
|
import { log } from '../log';
|
|
import { UserConfig } from '../UserConfig';
|
|
import { App } from '../app';
|
|
|
|
const router = Router({ caseSensitive: true });
|
|
|
|
// Static routes
|
|
router.get('/', (req, res) => !UserConfig.ready ? res.redirect('/') : res.render('admin', { version: App.pkgVersion }));
|
|
router.get('/ui.js', (req, res) => !UserConfig.ready ? res.send('') : res.type('text/javascript').sendFile(path.join('dist-frontend/admin.mjs')));
|
|
|
|
router.post('/', BodyParserJson(), async (req, res) => {
|
|
});
|
|
|
|
export { router };
|