feat: agent share global methods/controllers

This commit is contained in:
Danny Avila 2024-09-03 18:17:44 -04:00
parent 72dfcb9dc9
commit 3f694f2e25
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
7 changed files with 129 additions and 13 deletions

View file

@ -6,8 +6,6 @@ const { isEnabled } = require('~/server/utils');
const { getLogStores } = require('~/cache');
const { logger } = require('~/config');
const { GLOBAL_PROJECT_NAME } = Constants;
const router = express.Router();
const emailLoginEnabled =
process.env.ALLOW_EMAIL_LOGIN === undefined || isEnabled(process.env.ALLOW_EMAIL_LOGIN);
@ -34,7 +32,7 @@ router.get('/', async function (req, res) {
return today.getMonth() === 1 && today.getDate() === 11;
};
const instanceProject = await getProjectByName(GLOBAL_PROJECT_NAME, '_id');
const instanceProject = await getProjectByName(Constants.GLOBAL_PROJECT_NAME, '_id');
const ldap = getLdapConfig();