index.js 400 Bytes
'use strict';
const SeoIndexModel = require('../../models/seo/index');

const index = (req, res) => {
    return req.ctx(SeoIndexModel).writerGoodsXml(req.params).then(result => {
        return res.json(result);
    });
};

const demoXml = (req, res) => {
    res.setHeader('Content-Type', 'text/xml; charset=utf-8');
    res.render('seo/demo-xml');
};

module.exports = {
    index,
    demoXml
};