Kaydet (Commit) 8eaa0d8f authored tarafından Ömer SAVAŞ's avatar Ömer SAVAŞ 💬

Yeni Dosya Yükle

üst b1368bee
var convert = require('xml-js');
module.exports =
{
donustur(th, ctx, route, req, res, data)
{
ctx.meta.$responseType = "application/json";
if(typeof req.$params.rtype == "undefined")
return data;
var type = req.$params.rtype;
switch(type)
{
case "xml":
ctx.meta.$responseType = "application/xml";
var options = {compact: true, ignoreComment: true, spaces: 4};
return convert.js2xml({root: data}, options);
default:
return data;
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment