const fetch = require('node-fetch');
const log = require('../common/log');

function getStats(req, res) {
    let requestUrl = `${req.context.config.api.directory}/admin/organizations/total_count/`;
    return log(fetch)(requestUrl, { method: 'get', headers: req.context.headers })
        .then(response => response.json())
        .catch(error => {});
}

module.exports = getStats;
