From fb3a511a410b266dacb06b7d1dae3d3922d2e399 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 2 Aug 2022 14:12:56 +0530 Subject: [PATCH] UI: Use new registration status API endpoint --- monkey/monkey_island/cc/ui/src/services/AuthService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/services/AuthService.js b/monkey/monkey_island/cc/ui/src/services/AuthService.js index f8d7b0754..202d204a6 100644 --- a/monkey/monkey_island/cc/ui/src/services/AuthService.js +++ b/monkey/monkey_island/cc/ui/src/services/AuthService.js @@ -4,6 +4,7 @@ export default class AuthService { SECONDS_BEFORE_JWT_EXPIRES = 20; AUTHENTICATION_API_ENDPOINT = '/api/authenticate'; REGISTRATION_API_ENDPOINT = '/api/register'; + REGISTRATION_STATUS_API_ENDPOINT = '/api/registration-status'; login = (username, password) => { return this._login(username, password); @@ -91,7 +92,7 @@ export default class AuthService { }; needsRegistration = () => { - return fetch(this.REGISTRATION_API_ENDPOINT, + return fetch(this.REGISTRATION_STATUS_API_ENDPOINT, {method: 'GET'}) .then(response => response.json()) .then(res => {