mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: remove path alias.
feat: remove Webpack and depend on nodemon. feat: refactoring expenses. feat: optimize system users with caching. feat: architecture tenant optimize.
This commit is contained in:
25
server/src/api/controllers/Agendash.ts
Normal file
25
server/src/api/controllers/Agendash.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user