const _get = require('lodash/get');
const APIClient = require('../lib2/APIClient');
const getBasicRequestHeaders = require('../lib2/getBasicRequestHeaders');

module.exports = function settings(req) {
    return new APIClient(req, _get(req, 'config.api.settings'), {
        ...getBasicRequestHeaders(req),
        Authorization: `Token ${req.config.tokens.settings}`,
    });
};
