- Add check for registration_enabled on /register endpoint
- Made songlookup check artist name as well
This commit is contained in:
Daniel Mason 2021-04-03 14:16:13 +13:00
parent 9cbb94fc56
commit 8324894b0f
Signed by: idanoo
GPG key ID: 387387CDBC02F132
7 changed files with 47 additions and 14 deletions

View file

@ -252,12 +252,3 @@ export const getServerInfo = () => {
return handleErrorResp(error)
});
}
export const resetScrobbleToken = () => {
return axios.patch(process.env.REACT_APP_API_URL + "user", { token: "" }, { headers: getHeaders() })
.then((data) => {
return data.data
}).catch((error) => {
return handleErrorResp(error)
});
}

View file

@ -56,7 +56,7 @@ const User = () => {
const resetToken = () => {
setLoading(true);
resetScrobbleToken(user.uuid)
patchUser({ token: '' })
.then(() => {
getUser()
.then(data => {