GDBrowser/api/song.js
2022-05-27 15:22:25 +02:00

10 lines
No EOL
322 B
JavaScript

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)
return res.send(!body.startsWith("-") && body.length > 10)
})
}