Shrink JSON

v1.18.x
RoiEX 8 years ago
parent 186c1f40e9
commit f1b4a9b786

@ -17,27 +17,15 @@ module.exports = function (req, res, next) {
function generateXML() { function generateXML() {
return xml([{ return xml([{
OpenSearchDescription: [ OpenSearchDescription: [
{ { _attr: { xmlns: 'http://a9.com/-/spec/opensearch/1.1/' }},
_attr: { { ShortName: String(meta.config.title || meta.config.browserTitle || 'NodeBB') },
xmlns: 'http://a9.com/-/spec/opensearch/1.1/', { Description: String(meta.config.description || '') },
}, { Url: [{
},
{
ShortName: String(meta.config.title || meta.config.browserTitle || 'NodeBB'),
},
{
Description: String(meta.config.description || ''),
},
{
Url: [
{
_attr: { _attr: {
type: 'text/html', type: 'text/html',
method: 'get', method: 'get',
template: nconf.get('url') + '/search?term={searchTerms}&in=titlesposts', template: nconf.get('url') + '/search?term={searchTerms}&in=titlesposts' },
}, }],
},
],
}, },
], ],
}], { declaration: true, indent: '\t' }); }], { declaration: true, indent: '\t' });

Loading…
Cancel
Save