UI: Use new registration status API endpoint
This commit is contained in:
parent
420839d0bc
commit
fb3a511a41
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in New Issue