Rianofc commited on
Commit
326cb11
·
verified ·
1 Parent(s): 906118f

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -61,9 +61,9 @@ app.get('/download', async (req, res) => {
61
  if (!url) return res.status(400).json({ error: 'URL Spotify diperlukan' });
62
 
63
  try {
64
- const fileUrlh = axios.get(`https://backed-spotify.ex-project.my.id/download?url=${url}&signature=abcd5etyg2n89ewayyw`)
65
  const metadata = await spotifyInfo(url);
66
- const fileUrl = fileUrlh.data.url
67
  const shortToken = generateShortToken();
68
  cache.set(shortToken, { fileUrl, metadata });
69
 
 
61
  if (!url) return res.status(400).json({ error: 'URL Spotify diperlukan' });
62
 
63
  try {
64
+ const { data } = await axios.get(`https://backed-spotify.ex-project.my.id/download?url=${url}&signature=abcd5etyg2n89ewayyw`)
65
  const metadata = await spotifyInfo(url);
66
+ const fileUrl = data.url
67
  const shortToken = generateShortToken();
68
  cache.set(shortToken, { fileUrl, metadata });
69