cc: Remove setNoAuth() fron RegisterPage.js

This commit is contained in:
Shreya Malviya 2021-09-01 16:04:05 +05:30
parent 3e453e8b2c
commit 6937a6b81a
1 changed files with 0 additions and 24 deletions

View File

@ -24,30 +24,6 @@ class RegisterPageComponent extends React.Component {
});
};
setNoAuth = () => {
let options = {};
options['headers'] = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
options['method'] = 'PATCH';
options['body'] = JSON.stringify({'server_config': 'standard'});
return fetch(this.NO_AUTH_API_ENDPOINT, options)
.then(res => {
if (res.status === 200) {
this.auth.attemptNoAuthLogin().then(() => {
this.redirectToHome();
});
} else {
this.setState({
failed: true,
error: res['error']
});
}
})
}
updateUsername = (evt) => {
this.username = evt.target.value;
};