mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
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:
@@ -304,7 +304,16 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async postPrelogin(request: PreloginRequest): Promise<PreloginResponse> {
|
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);
|
return new PreloginResponse(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +355,16 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
postRegister(request: RegisterRequest): Promise<any> {
|
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> {
|
async postPremium(data: FormData): Promise<PaymentResponse> {
|
||||||
|
|||||||
Reference in New Issue
Block a user