From 380a7c7ee54121a55938729a3ef3d574b3e5937d Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 4 Feb 2022 09:22:19 -0500 Subject: [PATCH] Use Identity server routes (#649) * Use Identity server routes We've moved `prelogin` and `register` endpoints to the Indentity project Reflecting that change here * Only update path for dev environment --- common/src/services/api.service.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/common/src/services/api.service.ts b/common/src/services/api.service.ts index ba2dd046ab..4eda12e1c3 100644 --- a/common/src/services/api.service.ts +++ b/common/src/services/api.service.ts @@ -304,7 +304,16 @@ export class ApiService implements ApiServiceAbstraction { } async postPrelogin(request: PreloginRequest): Promise { - const r = await this.send("POST", "/accounts/prelogin", request, false, true); + const r = await this.send( + "POST", + "/accounts/prelogin", + request, + false, + true, + this.platformUtilsService.isDev() + ? this.environmentService.getIdentityUrl() + : this.environmentService.getApiUrl() + ); return new PreloginResponse(r); } @@ -346,7 +355,16 @@ export class ApiService implements ApiServiceAbstraction { } postRegister(request: RegisterRequest): Promise { - return this.send("POST", "/accounts/register", request, false, false); + return this.send( + "POST", + "/accounts/register", + request, + false, + false, + this.platformUtilsService.isDev() + ? this.environmentService.getIdentityUrl() + : this.environmentService.getApiUrl() + ); } async postPremium(data: FormData): Promise {