18 lines
518 B
JavaScript
18 lines
518 B
JavaScript
import { config } from '../config.js';
|
|
import { getBootstrap } from '../models/bootstrapModel.js';
|
|
import { getSetting } from '../models/settingsModel.js';
|
|
import { isEntraLoginConfigured } from '../services/entraService.js';
|
|
|
|
export function health(req, res) {
|
|
res.json({
|
|
ok: true,
|
|
nodeEnv: config.nodeEnv,
|
|
serverFqdn: getSetting('server_fqdn') || config.serverFqdn,
|
|
entraLoginEnabled: isEntraLoginConfigured()
|
|
});
|
|
}
|
|
|
|
export function bootstrap(req, res) {
|
|
res.json(getBootstrap(req.user.id));
|
|
}
|