UI: Use new registration status API endpoint

This commit is contained in:
Shreya Malviya 2022-08-02 14:12:56 +05:30
parent 420839d0bc
commit fb3a511a41
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ export default class AuthService {
SECONDS_BEFORE_JWT_EXPIRES = 20; SECONDS_BEFORE_JWT_EXPIRES = 20;
AUTHENTICATION_API_ENDPOINT = '/api/authenticate'; AUTHENTICATION_API_ENDPOINT = '/api/authenticate';
REGISTRATION_API_ENDPOINT = '/api/register'; REGISTRATION_API_ENDPOINT = '/api/register';
REGISTRATION_STATUS_API_ENDPOINT = '/api/registration-status';
login = (username, password) => { login = (username, password) => {
return this._login(username, password); return this._login(username, password);
@ -91,7 +92,7 @@ export default class AuthService {
}; };
needsRegistration = () => { needsRegistration = () => {
return fetch(this.REGISTRATION_API_ENDPOINT, return fetch(this.REGISTRATION_STATUS_API_ENDPOINT,
{method: 'GET'}) {method: 'GET'})
.then(response => response.json()) .then(response => response.json())
.then(res => { .then(res => {