mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
fix bad send
This commit is contained in:
parent
18653b0015
commit
0df783d0bb
@ -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": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user