fix bad send

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

View File

@ -100,7 +100,7 @@ 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: {
"Authorization": `Bearer ${authToken}`
},
@ -112,9 +112,10 @@ export default class SyncController extends Controller {
return null
})
if (response) {
return res.json(data)
}
}
},
"/spotify/currently_playing": {
middlewares: ["withAuthentication"],