added base graph logic for cycle detection

This commit is contained in:
2024-07-31 00:06:26 +05:30
parent 971698b318
commit 9bc0cb651d
5 changed files with 123 additions and 15 deletions

View File

@@ -98,11 +98,11 @@ const getPlaylistDetails = async (req, res) => {
try {
uri = parseSpotifyLink(req.query.playlist_link)
if (uri.type !== "playlist") {
return res.status(400).send("Not a playlist link");
return res.status(400).send({ message: "Invalid Spotify playlist link" });
}
} catch (error) {
logger.error("parseSpotifyLink", { error });
return res.sendStatus(400);
return res.status(400).send({ message: "Invalid Spotify playlist link" });
}
const response = await axiosInstance.get(