add version field in response

master
DIYgod 6 years ago
parent 05ea298d3d
commit e796e2f712
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
  1. 2
      routes/v2/bilibili.js
  2. 2
      routes/v2/get.js

@ -31,6 +31,7 @@ module.exports = function (req, res) {
var dan = {
code: 0,
version: 2,
danmaku: []
};
@ -77,6 +78,7 @@ module.exports = function (req, res) {
var dan = {
code: 0,
version: 2,
danmaku: []
};

@ -31,6 +31,7 @@ module.exports = function (req, res) {
res.send(JSON.stringify({
code: 0,
version: 2,
danmaku: data.map(item => [item.time, typeMap[item.type], item.color, item.author, item.text])
}));
}
@ -53,6 +54,7 @@ module.exports = function (req, res) {
}
res.send(JSON.stringify({
code: 0,
version: 2,
danmaku: data.map(item => [item.time, typeMap[item.type], item.color, item.author, item.text])
}));
})

Loading…
Cancel
Save