GDBrowser/api/song.js

10 lines
322 B
JavaScript
Raw Permalink Normal View History

2021-01-05 13:03:04 -03:00
module.exports = async (app, req, res) => {
if (req.offline) return res.sendError()
let songID = req.params.song
req.gdRequest('getGJSongInfo', {songID: songID}, function(err, resp, body) {
if (err) return res.sendError(400)
2022-02-06 21:18:45 -03:00
return res.send(!body.startsWith("-") && body.length > 10)
})
2022-02-06 21:18:45 -03:00
}