Fixed ERR_HTTP_HEADERS_SENT when loading charts

This commit is contained in:
RemixDev 2022-01-04 23:21:53 +01:00
parent 310c063055
commit 133c12af04

View File

@ -29,8 +29,7 @@ const handler: RequestHandler<{}, {}, {}, RawChartTracksQuery> = async (req, res
const limit = req.query.limit const limit = req.query.limit
const response = await dz.api.get_playlist_tracks(playlistId, { index, limit }) const response = await dz.api.get_playlist_tracks(playlistId, { index, limit })
res.status(200).send(response) return res.status(200).send(response)
next()
} catch (error) { } catch (error) {
if (isBadRequestError(error)) { if (isBadRequestError(error)) {
consoleError(error.message) consoleError(error.message)