tidying up redis' remains while shifting to sqlite, DRYer 500 responses

This commit is contained in:
2024-07-24 20:09:54 +05:30
parent 5803c997b2
commit 40cf0c2e2b
8 changed files with 1285 additions and 114 deletions

View File

@@ -73,7 +73,7 @@ const getUserPlaylists = async (req, res) => {
return res.status(200).send(playlists);
} catch (error) {
logger.error('getUserPlaylists', { error });
return res.status(500).send({ message: "Server Error. Try again." });
return res.sendStatus(500);
}
}
@@ -155,7 +155,7 @@ const getPlaylistDetails = async (req, res) => {
return res.status(200).send(playlist);
} catch (error) {
logger.error('getPlaylistDetails', { error });
return res.status(500).send({ message: "Server Error. Try again." });
return res.sendStatus(500);
}
}