channel.js 518 Bytes
'use strict';
const api = global.yoho.ServiceAPI;
const contentCode = require('../../../config/content-code');
const resourcesProcess = require('../../../utils/resources-process');

let channel = {
    getResourcesData(c) {
        return api.get('operations/api/v5/resource/get', {
            content_code: contentCode.channel[c]
        }, {
            cache: true,
            code: 200
        }).then(result => {
            return resourcesProcess(result.data);
        });
    }
};

module.exports = channel;