GDBrowser/api/song.js
2022-02-06 19:18:45 -05: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)
})
}