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
This commit is contained in:
Matt Gibson 2022-02-04 09:22:19 -05:00 committed by GitHub
parent 4252501620
commit 380a7c7ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 2 deletions

View File

@ -304,7 +304,16 @@ export class ApiService implements ApiServiceAbstraction {
}
async postPrelogin(request: PreloginRequest): Promise<PreloginResponse> {
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<any> {
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<PaymentResponse> {