fix bad send

This commit is contained in:
SrGooglo 2023-01-24 00:31:14 +00:00
parent 18653b0015
commit 0df783d0bb

View File

@ -100,20 +100,21 @@ export default class SyncController extends Controller {
}) })
} }
const { data } = await axios.get("https://api.spotify.com/v1/me", { const response = await axios.get("https://api.spotify.com/v1/me", {
headers: { headers: {
"Authorization": `Bearer ${authToken}` "Authorization": `Bearer ${authToken}`
}, },
}).catch((error) => { }).catch((error) => {
console.error(error.response.data) console.error(error.response.data)
res.status(error.response.status).json(error.response.data) res.status(error.response.status).json(error.response.data)
return null return null
}) })
if (response) {
return res.json(data) return res.json(data)
}
} }
}, },
"/spotify/currently_playing": { "/spotify/currently_playing": {