mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: remove Webpack and depend on nodemon. feat: refactoring expenses. feat: optimize system users with caching. feat: architecture tenant optimize.
26 lines
524 B
TypeScript
26 lines
524 B
TypeScript
|
|
import { Router } from 'express'
|
|
import basicAuth from 'express-basic-auth';
|
|
import agendash from 'agendash'
|
|
import { Container } from 'typedi'
|
|
import config from 'config'
|
|
|
|
export default class AgendashController {
|
|
|
|
static router() {
|
|
const router = Router();
|
|
const agendaInstance = Container.get('agenda')
|
|
|
|
router.use('/dash',
|
|
basicAuth({
|
|
users: {
|
|
[config.agendash.user]: config.agendash.password,
|
|
},
|
|
challenge: true,
|
|
}),
|
|
agendash(agendaInstance)
|
|
);
|
|
return router;
|
|
}
|
|
}
|