Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 5a8b874

Browse files
committed
Add localhost for non-prod environment
1 parent 7cf2e73 commit 5a8b874

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
export const environment = {
66
production: false,
7-
backendUrl: 'http://localhost:9000/rest/',
7+
backendUrl: 'https://auth-api.webtree.org/rest/',
88
};
99

1010
/*

src/login/login.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {AlertService, AuthenticationService, TokenService} from '../_services';
44
import {User} from '../_models';
55
import {sha512} from 'js-sha512';
66
import {FormBuilder} from '@angular/forms';
7+
import {environment} from '../environments/environment';
78

89
@Component({
910
selector: 'app-login',
@@ -34,6 +35,10 @@ export class LoginComponent implements OnInit {
3435
}
3536

3637
async ngOnInit() {
38+
if (!environment.production) {
39+
// @ts-ignore
40+
this.unions.localhost = {key: 'localhost', name: 'Localhost', url: 'http://localhost:4200/applyToken'};
41+
}
3742
this.returnUnion = this.route.snapshot.queryParams.returnUnion;
3843
await this.updateIsLoginField();
3944
this.redirectIfNeeded();

0 commit comments

Comments
 (0)