"use strict";

module.exports = {
    getConfig: function () {
        const redisConfig = config.get('redis');

        if (redisConfig) {
            // allow old redis config work if default is not found
            return redisConfig.default || redisConfig;
        }

        return;
    },
    getSessionConfig: function () {
        const redisConfig = config.get('redis');

        if (redisConfig) {
            return redisConfig.sessions || redisConfig.default || redisConfig;
        }

        return;
    }
};