const directory = require('../api2/directory');

module.exports = () => (req, res, next) => {
    directory(req)
        .send('GET', '/v11/settings/')
        .then(res => res.json())
        .then(data => {
            req.ctx.orgSettings = data;

            next();
        })
        .catch(() => {
            next();
        });
};
